avformat/moflex: Simplify freeing packets

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/362/head
Andreas Rheinhardt 4 years ago
parent a4d036965d
commit 2e1d5123c1
  1. 5
      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;

Loading…
Cancel
Save