[FFmpeg-devel] [PATCH 05/18] avformat/moflex: Simplify freeing packets
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Fri Mar 19 07:58:51 EET 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
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;
--
2.27.0
More information about the ffmpeg-devel
mailing list