From 2e1d5123c16291f9096e3c1e56f90744099511ad Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 18 Mar 2021 15:43:54 +0100 Subject: [PATCH] avformat/moflex: Simplify freeing packets Signed-off-by: Andreas Rheinhardt --- libavformat/moflex.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/moflex.c b/libavformat/moflex.c index 41335ada78..dabe113e6b 100644 --- a/libavformat/moflex.c +++ b/libavformat/moflex.c @@ -369,10 +369,7 @@ static int moflex_read_seek(AVFormatContext *s, int stream_index, static int moflex_read_close(AVFormatContext *s) { for (int i = 0; i < s->nb_streams; i++) { - AVPacket *packet = s->streams[i]->priv_data; - - av_packet_free(&packet); - s->streams[i]->priv_data = 0; + av_packet_free((AVPacket **)&s->streams[i]->priv_data); } return 0;