avformat/moflex: Simplify freeing packets

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-03-18 15:43:54 +01:00
parent a4d036965d
commit 2e1d5123c1
1 changed files with 1 additions and 4 deletions

View File

@ -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;