[libav-devel] [PATCH] lavu/qsv: fix a random hwupload failure regression

Luca Barbato lu_zero at gentoo.org
Wed Oct 3 07:56:51 CEST 2018


On 30/09/2018 11:59, Zhong Li wrote:
> Variable 'ret' hasn't been initialized´╝îthus introducing a random
> hwupload failure regression due to qsv session uninitialized.
> 
> Signed-off-by: Zhong Li <zhong.li at intel.com>
> ---
>  libavutil/hwcontext_qsv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
> index 1887936..f550bac 100644
> --- a/libavutil/hwcontext_qsv.c
> +++ b/libavutil/hwcontext_qsv.c
> @@ -833,7 +833,7 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
>  
>      mfxSyncPoint sync = NULL;
>      mfxStatus err;
> -    int ret;
> +    int ret = 0;
>  
>      while (!s->session_upload_init && !s->session_upload && !ret) {
>  #if HAVE_PTHREADS
> 

Sounds correct, thank you for spotting it!

lu


More information about the libav-devel mailing list