[FFmpeg-devel] strange seek problem matroska and avcodec_flush_buffers

Don Moir donmoir at comcast.net
Sun Feb 19 10:42:50 CET 2012


I think this is just a bad file and not to concerned about it but it has annoyed me.

You will get various results with this file depending on the player used.

ffplay will report various errors when you try to seek and probably a good indication the file is just bad.

If you just use ffplay it will seem to seek ok for while but I think it just got lucky.

If you use ffplay -ss 2 bad_seek_matroska_strange.mkv it will be displaying a frame not associated with the audio. This is mostly what I see in my own app. That is, a long pause before the frames start to reanimate but the audio is fine.

SMPlayer is pretty close on it but with distorted frames.

VLC is pretty good with it and not to much distortion.

For my own app and ffdhow the behavior is identical. That is, the audio is right on but may be some time before the video starts to reanimate.

The strange thing is, if I don't call avcodec_flush_buffers, the damn thing works almost perfect for me. Very clean actually, no distortion but a little frame flicker.

I have to assume for now that SMPlayer is not calling avcodec_flush_buffers when seeking because it almost works. Just some distortion.

I am not sure if it's worth looking into or not. We could just claim this is a bad file and be done with it.

I believe I have a few files like this. I don't really know what to say about it other than the above and not sure if it warrants a ticket. It has nothing to do with recent matroska patches. It had the same behavior before and after recent patches.

http://sms.pangolin.com/temp/bad_seek_matroska_strange.mkv  (2.5 mb)


More information about the ffmpeg-devel mailing list