lavc: fix hw_device_ctx operation

Commit f53d483ded 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>
This commit is contained in:
wm4
2017-10-24 00:28:03 +02:00
committed by Mark Thompson
parent 9b1bbd13e4
commit fd61c38454
+2 -4
View File
@@ -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;