diff --git a/libavformat/mov.c b/libavformat/mov.c index 4de31135b4..9467370cce 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7819,8 +7819,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) aax_filter(pkt->data, pkt->size, mov); ret = cenc_filter(mov, st, sc, pkt, current_index); - if (ret < 0) + if (ret < 0) { + av_packet_unref(pkt); return ret; + } return 0; }