diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-19 01:15:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-19 01:15:40 +0100 |
commit | 36a60fad6215db39e9cd9523e3425f64464046c7 (patch) | |
tree | ccca0ad28a599f87f572f7efdd1f3ccfb017e6d5 | |
parent | fca85ce5ecc8acba6a5cf10c5f99e932b26c6367 (diff) | |
download | ffmpeg-36a60fad6215db39e9cd9523e3425f64464046c7.tar.gz |
lavf: cdg has large non keyframe segments and should thus be exempt from the non keyframe check in seeking.
Improves seeking for cdg files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 1906b27536..35d85cbf3d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1823,7 +1823,7 @@ static int seek_frame_generic(AVFormatContext *s, if(stream_index == pkt.stream_index && pkt.dts > timestamp){ if(pkt.flags & AV_PKT_FLAG_KEY) break; - if(nonkey++ > 1000){ + if(nonkey++ > 1000 && st->codec->codec_id != CODEC_ID_CDGRAPHICS){ av_log(s, AV_LOG_ERROR,"seek_frame_generic failed as this stream seems to contain no keyframes after the target timestamp, %d non keyframes found\n", nonkey); break; } |