[FFmpeg-devel] [PATCH] Pass pts values through encoder by default.
Michael Niedermayer
michaelni at gmx.at
Sun Jan 22 13:53:12 CET 2012
On Sun, Jan 22, 2012 at 11:25:25AM +0100, Reimar Döffinger wrote:
> Avoids having to duplicate the code for trivial, non-reordering
> encoders.
> Completely and utterly breaks almost all H.264 conformance tests,
> sometimes just making the pts start with negative values, sometimes
> only giving 2 instead of 20 decoded frames or failing with not
> correctly ordered pts.
>
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
> libavcodec/utils.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index a505fa5..ce6e93c 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -1141,6 +1141,8 @@ int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf
> }
> if(av_image_check_size(avctx->width, avctx->height, 0, avctx))
> return -1;
> + if (pict)
> + avctx->coded_frame->pts = pict->pts;
This doesnt look correct for non trivial encoders like h264
but maybe iam not fully awake yet ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120122/d542b7c8/attachment.asc>
More information about the ffmpeg-devel
mailing list