[FFmpeg-cvslog] ffmpeg: request sample if the decoder & demuxer has_b_frames mismatch

Michael Niedermayer git at videolan.org
Tue Jun 3 15:31:40 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  3 15:09:42 2014 +0200| [768ef0f19e4f553a307f4b5e16d252a32d5dd8d3] | committer: Michael Niedermayer

ffmpeg: request sample if the decoder & demuxer has_b_frames mismatch

We cannot use avpriv_request_sample() as this is private to the libs
or rather it would be a bad usage example

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

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

 ffmpeg.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index acfefe3..dec26ce 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1863,6 +1863,12 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
     // The following line may be required in some cases where there is no parser
     // or the parser does not has_b_frames correctly
 //     ist->st->codec->has_b_frames = ist->dec_ctx->has_b_frames;
+    if (ist->st->codec->has_b_frames < ist->dec_ctx->has_b_frames) {
+        av_log(ist->dec_ctx, AV_LOG_WARNING, "has_b_frames is larger in decoder than demuxer");
+        av_log(ist->dec_ctx, AV_LOG_WARNING, "If you want to help, upload a sample "
+               "of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ "
+               "and contact the ffmpeg-devel mailing list.\n");
+    }
 
     if (*got_output || ret<0 || pkt->size)
         decode_error_stat[ret<0] ++;



More information about the ffmpeg-cvslog mailing list