avpacket: Replace av_free_packet with av_packet_unref
[ffmpeg.git] / libavformat / rl2.c
index a6544c3..51de347 100644 (file)
@@ -245,7 +245,7 @@ static int rl2_read_packet(AVFormatContext *s,
     /** fill the packet */
     ret = av_get_packet(pb, pkt, sample->size);
     if(ret != sample->size){
-        av_free_packet(pkt);
+        av_packet_unref(pkt);
         return AVERROR(EIO);
     }