On Thu, Jun 05, 2014 at 01:21:09PM +0530, Nidhi Makhijani wrote:
> --- a/libavformat/oggdec.c
> +++ b/libavformat/oggdec.c
> @@ -494,10 +517,29 @@ static int ogg_get_headers(AVFormatContext *s)
>      return 0;
>  }
>  
> -static int ogg_get_length(AVFormatContext *s)
> +
> +static int ogg_read_close(AVFormatContext *s)
>  {

Stray extra empty line added.

>      struct ogg *ogg = s->priv_data;
>      int i;
> +
> +    for (i = 0; i < ogg->nstreams; i++) {
> +        av_free(ogg->streams[i].buf);
> +        if (ogg->streams[i].codec &&
> +            ogg->streams[i].codec->cleanup) {
> +            ogg->streams[i].codec->cleanup(s, i);
> +        }
> +        av_free(ogg->streams[i].private);
> +    }
> +    av_free(ogg->state);
> +    av_free(ogg->streams);
> +    return 0;
> +}
> +
> @@ -525,26 +570,15 @@ static int ogg_get_length(AVFormatContext *s)
>  
> -static int ogg_read_close(AVFormatContext *s)
> -{
> -    struct ogg *ogg = s->priv_data;
> -    int i;
> +    return ret;
>  
> -    for (i = 0; i < ogg->nstreams; i++) {
> -        av_free(ogg->streams[i].buf);
> -        if (ogg->streams[i].codec &&
> -            ogg->streams[i].codec->cleanup) {
> -            ogg->streams[i].codec->cleanup(s, i);
> -        }
> -        av_free(ogg->streams[i].private);
> -    }
> -    av_free(ogg->streams);
> -    return 0;
>  }

Move the function in a separate patch please, it's easy to overlook
that you added a free.

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

Reply via email to