summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVoyager1 <Voyager@xbmc.org>2014-02-02 15:36:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-02 23:40:06 +0100
commit9f6f4962fbfdbaaa5ae82d1cf216356ce4a64e1c (patch)
treed7d2c7e778116dbfda1941bc8a86c2b979bea137
parentc81a9d13f427de55991aab588cdddd18f67e9db7 (diff)
downloadffmpeg-streaming-9f6f4962fbfdbaaa5ae82d1cf216356ce4a64e1c.zip
ffmpeg-streaming-9f6f4962fbfdbaaa5ae82d1cf216356ce4a64e1c.tar.gz
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: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 932b6ad..c094eec 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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);
OpenPOWER on IntegriCloud