Module: libav Branch: master Commit: e724bdfffbd3c27aac53d1f32f20f105f37caef0
Author: wm4 <[email protected]> Committer: Mark Thompson <[email protected]> Date: Tue Oct 24 00:28:03 2017 +0200 lavc: fix hw_device_ctx operation Commit b46a77f19d accidentally broke this (requested change that was added to the patch later and which was not fully tested). Signed-off-by: Mark Thompson <[email protected]> --- libavcodec/decode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 54cda53..27f75d7 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -698,11 +698,9 @@ int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, ret = avcodec_get_hw_frames_parameters(avctx, avctx->hw_device_ctx, avctx->hwaccel->pix_fmt, - avctx->hw_frames_ctx); - if (ret < 0) { - av_buffer_unref(&avctx->hw_frames_ctx); + &avctx->hw_frames_ctx); + if (ret < 0) return ret; - } frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
