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

Michael Niedermayer michaelni
Wed Aug 25 11:33:07 CEST 2010


On Tue, Aug 24, 2010 at 10:52:49PM +0200, P?sztor Szil?rd wrote:
> Michael Niedermayer:
> >> > ive no problem with a clean patch that exports such information
> >> 
> >> Ok, it won't hurt to try anyway. Here is a small patch that I believe is
> >> clean and maintains compatibility. Works with mplayer.
> > 
> > see AVFrame.repeat_pict
> 
> It seems logical but based on what in avcodec.h is said:
> 
> frame_duration = (1 + repeat_pict) * time_base
> 
> it means that the problem I'm trying to deal with would require -1 as a
> value which seems a hack to me. Could that be OK? I'm not sure to take
> the risk of touching this field, it is used extensively and I wouldn't
> want to break anything that already works.

repeat_pict is set correctly, an application can use it to find the frame
duration. If its not set correctly thats a bug and should be fixed
your patch does export a nonsense and wrong value that does often not
represent the frame duration and that often will not work
until you have read the relevant parts of teh spec i dont think we have
a basis for discussion

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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20100825/7500b24d/attachment.pgp>



More information about the ffmpeg-devel mailing list