Commit 95a8a5ac authored by Anton Khirnov's avatar Anton Khirnov

lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().

avcodec_get_frame_defaults() will be deprecated.
parent 674fa491
...@@ -1433,7 +1433,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi ...@@ -1433,7 +1433,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
return ret; return ret;
} }
avcodec_get_frame_defaults(picture); av_frame_unref(picture);
if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) { if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) {
if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
...@@ -1494,7 +1494,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, ...@@ -1494,7 +1494,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
return ret; return ret;
} }
avcodec_get_frame_defaults(frame); av_frame_unref(frame);
if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) { if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) {
ret = avctx->codec->decode(avctx, frame, got_frame_ptr, avpkt); ret = avctx->codec->decode(avctx, frame, got_frame_ptr, avpkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment