If allocating the AVFrame to contain a decoded frame fails, the AVPacket containing the data intended to be decoded leaks. This commit fixes this.
Unified · Split
| @@ -344,6 +344,7 @@ static av_cold void movie_uninit(AVFilterContext *ctx) · 343 unmodified lines | ||
| 344 | 344 | } |
| 345 | 345 | av_freep(&movie->st); |
| 346 | 346 | av_freep(&movie->out_index); |
| 347 | + av_packet_unref(&movie->pkt); | |
| 347 | 348 | if (movie->format_ctx) |
| 348 | 349 | avformat_close_input(&movie->format_ctx); |
| 349 | 350 | } |