avpacket: Replace av_free_packet with av_packet_unref
[ffmpeg.git] / libavformat / sapdec.c
index 0280cea..f09222d 100644 (file)
@@ -215,7 +215,7 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
             int i = s->nb_streams;
             AVStream *st = avformat_new_stream(s, NULL);
             if (!st) {
-                av_free_packet(pkt);
+                av_packet_unref(pkt);
                 return AVERROR(ENOMEM);
             }
             st->id = i;