diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-10-24 00:28:03 +0200 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-10-23 23:35:31 +0100 |
commit | e724bdfffbd3c27aac53d1f32f20f105f37caef0 (patch) | |
tree | b0526ef3c5abb35e3a193595a37cdd2e887fda0e | |
parent | 68649bfed30a35dc3e45ea240541b2774b2f282b (diff) | |
download | ffmpeg-e724bdfffbd3c27aac53d1f32f20f105f37caef0.tar.gz |
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 <sw@jkqxz.net>
-rw-r--r-- | libavcodec/decode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 54cda530bb..27f75d73e3 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; |