On Thu, Mar 20, 2008 at 05:47:15PM +0000, Vladimir Eremeev wrote:
> > You need ES frames, that is a SINGLE ES frame on each call, you cannot pass 
> > any PES packet its payload with or without headers.
> 
> During processing of the PES, how do I estimate, that I have completed an ES 
> frame?
> 
> I naively thought that PES packet has PTS only when it contains the start of 
> an 
> ES frame. 
> And when a PES packet has PTS_DTS_flags == 00, it contains something from the 
> middle of a frame.
> 
> Looks like this is not the case.
> I have two successive PES packets, both have PTS_DTS_flags == 11. 
> But av_parser_parse returns frame_size == 0, when I call it with the payload 
> of 
> the first packet.
> Also, this is the first call of the av_parser_parse during this program run...
> Does it mean, that the first PES packet doesn't contain the complete ES 
> frame, 
> and I must append the second PES packet payload to it?

A ES frame can be split over many PES packets, and 1 PES packet can contain
many ES frames. There are no restrictions at all where ES frames boundaries
are in PES packets.
The AVParser will split them for you properly it will also reorder timestamps
if you use it correctly. You still will have to interpolate all missing
timestamps after that though.
You wouldnt have to deal with any of that if you would use libavformat to
demux.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact

Attachment: signature.asc
Description: Digital signature

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to