Commit 9f6f4962 authored by Voyager1's avatar Voyager1 Committed by Michael Niedermayer

avformat/utils: dvd still frames read thru libdvdnav ended up in internal lavf buffer

This is the solution we've been using in XBMC for over 2 years for dvd still frames.
The problem is that the demuxer asks for probing of the codec in the mpeg stream.
This causes lavf to read the whole menu structure into internal buffers.
After which, it won't read from input stream anymore and no events triggers.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c81a9d13
......@@ -659,7 +659,7 @@ no_packet:
if (end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
int score = set_codec_from_probe_data(s, st, pd);
if ( (st->codec->codec_id != AV_CODEC_ID_NONE && score > AVPROBE_SCORE_RETRY)
if ( (st->codec->codec_id != AV_CODEC_ID_NONE && score > AVPROBE_SCORE_RETRY-1)
|| end) {
pd->buf_size = 0;
av_freep(&pd->buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment