Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
[ffmpeg.git] / libavformat / 4xm.c
index 260e080..70f0def 100644 (file)
@@ -321,7 +321,7 @@ static int fourxm_read_packet(AVFormatContext *s,
             ret = avio_read(s->pb, &pkt->data[8], size);
 
             if (ret < 0) {
-                av_free_packet(pkt);
+                av_packet_unref(pkt);
             } else {
                 packet_read = 1;
                 av_shrink_packet(pkt, ret + 8);