[FFmpeg-devel] strange seek problem matroska andavcodec_flush_buffers

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 19 19:53:13 CET 2012

On Sun, Feb 19, 2012 at 01:47:27PM -0500, Don Moir wrote:
> >>>The thing is, the "bad_seek_matroska_strange" file is a worst case
> >>>of this of the files I have. Some other files I have, have a very
> >>>slight indication of this. Maybe something like 1/8 to 1/4 of a
> >>>second. In these cases, settting CODEC_FLAG2_SHOW_ALL is worse
> >>>because you will see distortion where previously it was clean. While
> >>>seeing the distortion is helpful in some cases, I have more files
> >>>that are effected negatively by it.
> >>
> >>I may be missing something, but this should be a bug, the demuxer
> >>should be seeking exactly to a keyframe and CODEC_FLAG2_SHOW_ALL
> >>should not make the slightest difference at all.
> >
> >That's what I was thinking but wasn't sure how error concealment
> >came into play there.
> If this is a bug, I think it will be effecting libavcodec/h264.c and
> possibly libavcodec/mpeg12.c. I have an mpegts file with the same
> problem but this file as well as the "strange" file are both
> CODEC_ID_H264. I don't know what relationship mpeg12.c has if any,
> but just so you know.

No, the bug if would be in the demuxer if anything.
However the thing I missed is that with rawvideo (-ES, also -TS and -PS)
we currently don't even try to seek to keyframes, so for those
that would indeed be normal behaviour (even if it potentially should
be improved).
For ogg, mkv, nut, avi, ... it _should_ be a bug though if you have
some of these behaving like that.

More information about the ffmpeg-devel mailing list