[FFmpeg-devel] base av_read_frame() function for seeking in mpegps files

Ivan Schreter schreter
Sat Jul 25 13:01:59 CEST 2009


Hi Zhentan,

zhentan feng wrote:
> [...]
> I am not clear why the parser return the wrong frame size when fist call
> av_read_frame() after seek.
> anyone explain it futher?
>
>   
Well, there is probably a bug in the parser and seeking routine. I'm 
currently trying to get seeking in MPEG-TS working, but it also has its 
issues. There was a problem with determining proper start position of 
the frame, for instance, which caused some problems. Another problem is 
that the seeking routine simply picked a position within the file 
approximately with specified timestamp, but didn't care about 
constraints or key frames. I'm just working on this topic.

I'm afraid that MPEG-PS has a similar bug or bugs, but I don't know the 
code. I don't know if anyone can "explain" it as why it doesn't work 
(else it would be already fixed long time ago). So you'll have to read 
the spec and analyze the code to find the bug. See also Michael's post 
regarding frame/packet distribution.

Regards,

Ivan



More information about the ffmpeg-devel mailing list