[FFmpeg-devel] [PATCH] vorbis: unref the skipped first frame.

Hendrik Leppkes h.leppkes at gmail.com
Tue Mar 12 20:52:57 CET 2013


On Tue, Mar 12, 2013 at 8:33 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> ---
> Fixes memory leaks reported by valgrind.
>
> libavcodec/vorbisdec.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
> index 581b7bc..a7c0da5 100644
> --- a/libavcodec/vorbisdec.c
> +++ b/libavcodec/vorbisdec.c
> @@ -1752,6 +1752,7 @@ static int vorbis_decode_frame(AVCodecContext *avctx, void *data,
>      if (!vc->first_frame) {
>          vc->first_frame = 1;
>          *got_frame_ptr = 0;
> +        av_frame_unref(frame);
>          return buf_size;
>      }
>
> --
> 1.8.0.msysgit.0
>

Actually, it looks like the same change is coming later in the merge
from Anton, so feel free to disregard and keep merging instead.
I should've checked for such an obvious mistake already being fixed... :d


More information about the ffmpeg-devel mailing list