diff options
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8e7dc0f869..d7c3ecbf11 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1643,6 +1643,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi if ((avctx->coded_width || avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx)) return AVERROR(EINVAL); + avcodec_get_frame_defaults(picture); + if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) { int did_split = av_packet_split_side_data(&tmp); apply_param_change(avctx, &tmp); @@ -1759,6 +1761,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, return AVERROR(EINVAL); } + avcodec_get_frame_defaults(frame); + if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) { uint8_t *side; int side_size; |