Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
[ffmpeg.git] / libavformat / thp.c
index 5a748b0..5569027 100644 (file)
@@ -180,7 +180,7 @@ static int thp_read_packet(AVFormatContext *s,
         if (ret < 0)
             return ret;
         if (ret != size) {
-            av_free_packet(pkt);
+            av_packet_unref(pkt);
             return AVERROR(EIO);
         }
 
@@ -190,7 +190,7 @@ static int thp_read_packet(AVFormatContext *s,
         if (ret < 0)
             return ret;
         if (ret != thp->audiosize) {
-            av_free_packet(pkt);
+            av_packet_unref(pkt);
             return AVERROR(EIO);
         }