[FFmpeg-cvslog] lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().

Anton Khirnov git at videolan.org
Thu Feb 23 05:03:03 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jan  5 16:55:33 2012 +0100| [0584e3ca9793b3ad1c6b50eca74c4cfa04244941] | committer: Anton Khirnov

lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().

It is not supposed to be done outside lavc.

This is basically a revert of 818062f2f346df30f4ec0c0c1f54e8025cc3a80a.

It is unclear what issue this was supposed to fix, if it reappears again
it will have to be fixed in a more proper place.

The wtv-demux test change is because the sample starts with a B-frame.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0584e3ca9793b3ad1c6b50eca74c4cfa04244941
---

 libavformat/utils.c      |    4 ----
 tests/ref/fate/wtv-demux |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2417522..d6aab56 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -854,10 +854,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
     if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
         pkt->dts= AV_NOPTS_VALUE;
 
-    if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == AV_PICTURE_TYPE_B)
-        //FIXME Set low_delay = 0 when has_b_frames = 1
-        st->codec->has_b_frames = 1;
-
     /* do we have a video B-frame ? */
     delay= st->codec->has_b_frames;
     presentation_delayed = 0;
diff --git a/tests/ref/fate/wtv-demux b/tests/ref/fate/wtv-demux
index d20d041..6174604 100644
--- a/tests/ref/fate/wtv-demux
+++ b/tests/ref/fate/wtv-demux
@@ -33,9 +33,9 @@
 1,    7199998,    7199998,   240000,      576, 0xeb4b0d93
 1,    7439998,    7439998,   240000,      576, 0xde1322f5
 1,    7679998,    7679998,   240000,      576, 0xc3131f35
+0,    7886331,    9486442,   400000,    41980, 0xd4920915
 1,    7919998,    7919998,   240000,      576, 0x708f1381
 1,    8159998,    8159998,   240000,      576, 0x1f00137e
-0,    8286442,    9486442,   400000,    41980, 0xd4920915
 1,    8399998,    8399998,   240000,      576, 0x05131eb0
 1,    8639998,    8639998,   240000,      576, 0x78151c22
 0,    8686442,    8686442,   400000,     7228, 0x1b141fa3



More information about the ffmpeg-cvslog mailing list