Browse Source

avfilter/src_movie: Fix leak of packet upon error

If allocating the AVFrame to contain a decoded frame fails, the AVPacket
containing the data intended to be decoded leaks. This commit fixes
this.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
d91756c1b5
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavfilter/src_movie.c

+ 1
- 0
libavfilter/src_movie.c View File

@@ -344,6 +344,7 @@ static av_cold void movie_uninit(AVFilterContext *ctx)
}
av_freep(&movie->st);
av_freep(&movie->out_index);
av_packet_unref(&movie->pkt);
if (movie->format_ctx)
avformat_close_input(&movie->format_ctx);
}


Loading…
Cancel
Save