]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/s337m.c
avformat: Remove unnecessary av_packet_unref()
[ffmpeg] / libavformat / s337m.c
index 8956afb23fdad13486a0292b3c54849a7134e1c3..36e1047af82429c5c57debd17258e8be836d59b2 100644 (file)
@@ -174,7 +174,6 @@ static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt)
     pkt->pos = pos;
 
     if (avio_read(pb, pkt->data, pkt->size) < pkt->size) {
-        av_packet_unref(pkt);
         return AVERROR_EOF;
     }
 
@@ -186,7 +185,6 @@ static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt)
     if (!s->nb_streams) {
         AVStream *st = avformat_new_stream(s, NULL);
         if (!st) {
-            av_packet_unref(pkt);
             return AVERROR(ENOMEM);
         }
         st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;