diff mbox series

[FFmpeg-devel,05/18] avformat/moflex: Simplify freeing packets

Message ID 20210319055904.2264501-5-andreas.rheinhardt@gmail.com
State Accepted
Commit 2e1d5123c16291f9096e3c1e56f90744099511ad
Headers show
Series [FFmpeg-devel,01/18] libavformat/utils: Fix indentation | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 19, 2021, 5:58 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/moflex.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

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;