ffmpegdec: fix ogg stream play

This commit is contained in:
Jacek Jendrzej
2020-01-17 15:30:44 +01:00
parent 08cef8734d
commit f6f65093ae

View File

@@ -152,12 +152,11 @@ bool CFfmpegDec::Init(void *_in, const CFile::FileType /* ft */)
return false;
}
if (is_stream)
if (is_stream){
avc->probesize = 128 * 1024;
av_opt_set_int(avc, "analyzeduration", 1000000, 0);
avioc = avio_alloc_context (buffer, buffer_size, 0, this, read_packet, NULL, seek_packet);
av_opt_set_int(avc, "analyzeduration", 1000000, 0);
}
avioc = avio_alloc_context (buffer, buffer_size, 0, this, read_packet, NULL, !is_stream ? seek_packet:NULL);
if (!avioc) {
av_freep(&buffer);
avformat_free_context(avc);