mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/h264: use goto end instead of return for hwaccel fails as well
This is more correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4b03002527
commit
514d9bb55d
@ -1598,7 +1598,7 @@ again:
|
|||||||
|
|
||||||
if (h->avctx->hwaccel &&
|
if (h->avctx->hwaccel &&
|
||||||
(ret = h->avctx->hwaccel->start_frame(h->avctx, buf, buf_size)) < 0)
|
(ret = h->avctx->hwaccel->start_frame(h->avctx, buf, buf_size)) < 0)
|
||||||
return ret;
|
goto end;
|
||||||
if (CONFIG_H264_VDPAU_DECODER &&
|
if (CONFIG_H264_VDPAU_DECODER &&
|
||||||
h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
|
h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
|
||||||
ff_vdpau_h264_picture_start(h);
|
ff_vdpau_h264_picture_start(h);
|
||||||
@ -1610,7 +1610,7 @@ again:
|
|||||||
&buf[buf_index - consumed],
|
&buf[buf_index - consumed],
|
||||||
consumed);
|
consumed);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
goto end;
|
||||||
} else if (CONFIG_H264_VDPAU_DECODER &&
|
} else if (CONFIG_H264_VDPAU_DECODER &&
|
||||||
h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) {
|
h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) {
|
||||||
ff_vdpau_add_data_chunk(h->cur_pic_ptr->f.data[0],
|
ff_vdpau_add_data_chunk(h->cur_pic_ptr->f.data[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user