summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-14 23:23:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-14 23:32:08 +0200
commit5ded0b390b6181a1f67cdf855a9f8f3e4f3526c8 (patch)
treefe04aa4ed2acbe96a55536d1a906f5476715edf1 /ffmpeg.c
parent378ad224923128223a44795da0b838366f1db766 (diff)
downloadffmpeg-streaming-5ded0b390b6181a1f67cdf855a9f8f3e4f3526c8.zip
ffmpeg-streaming-5ded0b390b6181a1f67cdf855a9f8f3e4f3526c8.tar.gz
ffmpeg: for h264 we need has_b_frames from the decoder
Other solutions welcome Fixes Ticket3711 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6338a68..f2aef21 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1886,11 +1886,16 @@ 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_ask_for_sample(ist->dec_ctx, "has_b_frames is larger in decoder than demuxer %d > %d ",
- ist->dec_ctx->has_b_frames, ist->st->codec->has_b_frames
- );
+ if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) {
+ ist->st->codec->has_b_frames = ist->dec_ctx->has_b_frames;
+ } else
+ av_log_ask_for_sample(
+ ist->dec_ctx,
+ "has_b_frames is larger in decoder than demuxer %d > %d ",
+ ist->dec_ctx->has_b_frames,
+ ist->st->codec->has_b_frames
+ );
}
if (*got_output || ret<0 || pkt->size)
OpenPOWER on IntegriCloud