avpacket: Replace av_free_packet with av_packet_unref
[ffmpeg.git] / libavformat / flic.c
index 2eb6f05..277e12b 100644 (file)
@@ -228,7 +228,7 @@ static int flic_read_packet(AVFormatContext *s,
             ret = avio_read(pb, pkt->data + FLIC_PREAMBLE_SIZE,
                 size - FLIC_PREAMBLE_SIZE);
             if (ret != size - FLIC_PREAMBLE_SIZE) {
-                av_free_packet(pkt);
+                av_packet_unref(pkt);
                 ret = AVERROR(EIO);
             }
             packet_read = 1;
@@ -246,7 +246,7 @@ static int flic_read_packet(AVFormatContext *s,
             ret = avio_read(pb, pkt->data, size);
 
             if (ret != size) {
-                av_free_packet(pkt);
+                av_packet_unref(pkt);
                 ret = AVERROR(EIO);
             }