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

Michael Niedermayer michaelni
Tue Jul 14 22:24:13 CEST 2009

On Thu, Jul 09, 2009 at 05:36:48PM +0800, zhentan feng wrote:
> Hi
> I am implementing a seek api for mpegps demuxer.
> Index entries are already built before seeking, the frame pos is set as PES
> header pos.
> so when seek target timestamp,
> 1) look up the index and get the frame pos in the index entries.
> 2) use url_fseek() seek to the pos and call av_read_frame() until get the
> target frame
> here I have an error: the target frame size is not correct for some
> situation, ie not same with the actual frame size, but the pts/dts value is
> correct.

Well, its to be expected that the first frame that the parser outputs might be
incomplete, after seeking

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

GMX, the mailprovider that uses RBL lists to reject mails from your friends
running their own mailserver at home. The mailprovider that obscures the
origin of mails (mis)identified as viruses. The mailprovider that improves
security my disallowing more secure forms of authentication.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090714/9451ef1e/attachment.pgp>

More information about the ffmpeg-devel mailing list