For HEVC/MPEG4, we also need video_delay from the decoder, when decoding some HEVC/MPEG4 clips, got numerous log like: "video_delay is larger in decoder than demuxer", similar ticket: #3711
fix ticket: #6109 Signed-off-by: Lin Xie<lin....@intel.com> Signed-off-by: Jun Zhao <jun.z...@intel.com> --- fftools/ffmpeg.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 934dc71..7e939d0 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2389,7 +2389,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_ // The following line may be required in some cases where there is no parser // or the parser does not has_b_frames correctly if (ist->st->codecpar->video_delay < ist->dec_ctx->has_b_frames) { - if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) { + if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264 || + ist->dec_ctx->codec_id == AV_CODEC_ID_HEVC || + ist->dec_ctx->codec_id == AV_CODEC_ID_MPEG4) { ist->st->codecpar->video_delay = ist->dec_ctx->has_b_frames; } else av_log(ist->dec_ctx, AV_LOG_WARNING, -- 1.7.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel