Fixes a crash when decoding with for example h264_cuvid, as avpriv_h264_has_num_reorder_frames assumes the AVCodecContext->priv_data to be a H264Context. --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c index d605a96..06003dd 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -935,7 +935,7 @@ static int has_decode_delay_been_guessed(AVStream *st) if (!st->info) // if we have left find_stream_info then nb_decoded_frames won't increase anymore for stream copy return 1; #if CONFIG_H264_DECODER - if (st->internal->avctx->has_b_frames && + if (st->internal->avctx->has_b_frames && !strcmp(st->internal->avctx->codec->name, "h264") && avpriv_h264_has_num_reorder_frames(st->internal->avctx) == st->internal->avctx->has_b_frames) return 1; #endif -- 2.10.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel