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

zhihang wang zhihang.wang at gmail.com
Tue May 31 03:06:05 CEST 2011


>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
-- 
1.7.0.4









Best Regards
zhihang wang


More information about the ffmpeg-devel mailing list