[Ffmpeg-cvslog] r8334 - trunk/libavformat/matroska.c

Uoti Urpala uoti.urpala
Thu Mar 15 21:39:00 CET 2007


On Thu, 2007-03-15 at 14:05 -0600, Loren Merritt wrote:
> On Thu, 15 Mar 2007, Michael Niedermayer wrote:
> > num_reorder_frames is optional, what do you do if its not there?
> 
> When the num_reorder_frames syntax element is not present, the value of
> num_reorder_frames value shall be inferred to be equal to
> max_dec_frame_buffering.
> When the max_dec_frame_buffering syntax element is not present, the
> value of max_dec_frame_buffering shall be inferred to be equal to
> MaxDpbSize.
> MaxDpbSize is specified as a function of Level, which is not optional.

Does the libavcodec decoder use delay 16 in this case? If it doesn't
follow this spec (and IIRC it might not though I don't remember 100%
sure - after all it's inefficient to buffer 16 frames by default before
seeing a place where it is actually necessary) then writing the demuxer
assuming compliant behavior has practical problems. Of course assuming
non-compliant behavior has problems too...

> Or, since using a larger than necessary buffer will only waste memory
> not change the result, you can ignore the chain of fallbacks and just
> use 16 which is the max allowed value.

It does change the result. With delay 0 the dts values indicate that the
decoder is expected to output each frame immediately; with delay 16 they
indicate that the decoder is not expected to output anything for the
first 16 packets fed to it and after that is expected to output the
frame corresponding to the 16th earlier packet fed to it.





More information about the ffmpeg-cvslog mailing list