[FFmpeg-devel] [PATCH] Fix return value for incomplete H264 frame packets

Michael Niedermayer michaelni
Tue Aug 24 12:10:58 CEST 2010


On Tue, Aug 24, 2010 at 10:53:11AM +0200, P?sztor Szil?rd wrote:
> Michael Niedermayer:
> > your patch does not move us closer to that. read the spec please
> > there is no alternative, frame times are not neccessarily constant for
> > example thus your hack clearly is not sufficient
> 
> I'm open to all possible solutions and I may well read the H264 spec but it
> still doesn't help. As far as I understood, this no-picture return value has
> different meanings for different codecs, and this difference is lost behind
> the generic wrapper layer when seen from the outside by the player.

the demuxer/parser provides timestamps
1. pts which indicate at what time the input to the decoder will be displayed
   such pts are stored in reordered_opaque for each packet feeded into the
   decoder and the decoded frames contain the corresponding reordered_opaque

2. dts which are associated with decoder input packets so that each frame
   you get out the instance a packet is feeded in should then be displayed at
   that dts.

pts will likely be more reliable than dts for h264 with real world decoders.

also until you read the relevant parts of h264 & h222 you are not qualified to
work on this. Its not something you will get working reliable by trial and
error. (yes of course you can get it working for a subset of samples that way
but then these samples excercise maybe 5% of the cases and once a encoder uses
a different case the hacks become useless ...)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100824/7d31a129/attachment.pgp>



More information about the ffmpeg-devel mailing list