avpacket: Replace av_free_packet with av_packet_unref
[ffmpeg.git] / libavdevice / oss_dec.c
index 3f786cc..24d3571 100644 (file)
@@ -82,7 +82,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
 
     ret = read(s->fd, pkt->data, pkt->size);
     if (ret <= 0){
-        av_free_packet(pkt);
+        av_packet_unref(pkt);
         pkt->size = 0;
         if (ret<0)  return AVERROR(errno);
         else        return AVERROR_EOF;