Commit 36a60fad authored by Michael Niedermayer's avatar Michael Niedermayer

lavf: cdg has large non keyframe segments and should thus be exempt from the...

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fca85ce5
......@@ -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;
}
......
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