[FFmpeg-cvslog] ffmpeg: copy b frame codec delay back from decoder to demuxer

Michael Niedermayer git at videolan.org
Sun Jun 1 15:31:33 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  1 15:20:28 2014 +0200| [9fb45334fc534ec24137d27abcc1ba8ef3170a77] | committer: Michael Niedermayer

ffmpeg: copy b frame codec delay back from decoder to demuxer

The demuxer needs this value to generate correct timestamps in some corner cases
Ideally the parser would always set this correctly, but some parsers lac support
for extracting this value, also its not trivial.
This fixes a regression

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index 8c1faea..f667bd8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1856,6 +1856,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
     ret = avcodec_decode_video2(ist->dec_ctx,
                                 decoded_frame, got_output, pkt);
     update_benchmark("decode_video %d.%d", ist->file_index, ist->st->index);
+    ist->st->codec->has_b_frames = ist->dec_ctx->has_b_frames;
 
     if (*got_output || ret<0 || pkt->size)
         decode_error_stat[ret<0] ++;



More information about the ffmpeg-cvslog mailing list