[FFmpeg-cvslog] avformat/moflex: Simplify freeing packets
Andreas Rheinhardt
git at videolan.org
Wed Mar 24 02:02:54 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Mar 18 15:43:54 2021 +0100| [2e1d5123c16291f9096e3c1e56f90744099511ad] | committer: Andreas Rheinhardt
avformat/moflex: Simplify freeing packets
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e1d5123c16291f9096e3c1e56f90744099511ad
---
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;
More information about the ffmpeg-cvslog
mailing list