[FFmpeg-devel] [PATCH] libavu: add pkt_timebase to AVFrame.

Nicolas George george at nsup.org
Fri Jul 18 12:13:49 CEST 2014

Le decadi 30 messidor, an CCXXII, Benoit Fouet a écrit :
> +        if (frame && av_frame_get_pkt_timebase(frame).num)
> +            avpkt->duration = av_rescale_q(av_frame_get_pkt_duration(frame),
> +                                           av_frame_get_pkt_timebase(frame),
> +                                           avctx->time_base);

I suspect this is not a good idea at all: in a lot of cases,
av_frame_get_pkt_duration(frame) contains a random value not correlated to
the actual duration of the packet.

Making use of a field that was previously unused is an API change, and it
must be considered very carefully.

I suspect you can observe the inconsistent behaviour just by using ffmpeg
with a frame rate change, but I am not certain that is as simple as that.
Other applications may break more easily.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140718/e895360a/attachment.asc>

More information about the ffmpeg-devel mailing list