On Sun, Nov 9, 2014 at 8:48 AM, Vittorio Giovara
<[email protected]> wrote:
> From: Luca Barbato <[email protected]>
>
> CC: [email protected]
> Bug-Id: CID 1198262
> ---
>  libavcodec/dvdsubdec.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
> index 5d6db41..15abac0 100644
> --- a/libavcodec/dvdsubdec.c
> +++ b/libavcodec/dvdsubdec.c
> @@ -503,6 +503,7 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
>  {
>      DVDSubContext *ctx = avctx->priv_data;
>      char *data, *cur;
> +    int ret = 0;
>
>      if (!avctx->extradata || !avctx->extradata_size)
>          return 0;
> @@ -527,16 +528,18 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
>          } else if (!strncmp("size:", cur, 5)) {
>              int w, h;
>              if (sscanf(cur + 5, "%dx%d", &w, &h) == 2) {
> -               int ret = ff_set_dimensions(avctx, w, h);
> +               ret = ff_set_dimensions(avctx, w, h);
>                 if (ret < 0)
> -                   return ret;
> +                   goto fail;
>              }
>          }
>          cur += strcspn(cur, "\n\r");
>          cur += strspn(cur, "\n\r");
>      }
> +
> +fail:
>      av_free(data);
> -    return 0;
> +    return ret;
>  }
>
>  AVCodec ff_dvdsub_decoder = {
> --
> 1.9.3 (Apple Git-50)
>

ping

-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to