[FFmpeg-devel] [PATCH] Fixed presentation_delayed bug in compute_pkt_fields function

avcoder ffmpeg at gmail.com
Tue May 31 03:28:05 CEST 2011


The patch is wrong, I-frame can be delayed in non-closed GOP.

On Tue, May 31, 2011 at 9:06 AM, zhihang wang <zhihang.wang at gmail.com> wrote:
> From 483d529de1eedee0c53a816cc647af3e290c4a29 Mon Sep 17 00:00:00 2001
> From: xxthink <zhihang.wang at gmail.com>
> Date: Tue, 31 May 2011 00:18:07 +0800
> Subject: [PATCH] fixed setting presentation_delayed bug
>
> ---
>  libavformat/utils.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index f0080bc..ba0253f 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -915,7 +915,7 @@ static void compute_pkt_fields(AVFormatContext *s,
> AVStream *st,
>     /* XXX: need has_b_frame, but cannot get it if the codec is
>         not initialized */
>     if (delay &&
> -        pc && pc->pict_type != AV_PICTURE_TYPE_B)
> +        pc && (pc->pict_type != AV_PICTURE_TYPE_B && pc->pict_type !=
> AV_PICTURE_TYPE_I))
>         presentation_delayed = 1;
>
>     if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts
>> pkt->pts && st->pts_wrap_bits<63
> --


-- 
-----------------------------------------------------------------------------------------
My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2


More information about the ffmpeg-devel mailing list