summaryrefslogtreecommitdiff
path: root/libavformat/moflex.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-18 15:43:54 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-24 00:18:06 +0100
commit2e1d5123c16291f9096e3c1e56f90744099511ad (patch)
tree065d8547a3974543983e66dc705c01aaface4182 /libavformat/moflex.c
parenta4d036965dac42e7a7b50c6038c928d008655282 (diff)
downloadffmpeg-2e1d5123c16291f9096e3c1e56f90744099511ad.tar.gz
avformat/moflex: Simplify freeing packets
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/moflex.c')
-rw-r--r--libavformat/moflex.c5
1 files changed, 1 insertions, 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;