]> git.sesse.net Git - ffmpeg/commitdiff
avformat/ipmovie: Remove redundant av_packet_unref()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 18 Mar 2021 18:55:55 +0000 (19:55 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 23 Mar 2021 23:21:01 +0000 (00:21 +0100)
When one of these errors happens during ipmovie_read_packet(),
an error is returned and the packet is cleaned up generically.
And since 712d3ac539f30239b764d8621829dc9dc913da61 the same happens
in ipmovie_read_header().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/ipmovie.c

index 3234d591da187dd7ba2c22bf63dc5366e7cf5df7..26886d9592ad906c06d0f19ad39a4103ec72a51e 100644 (file)
@@ -194,7 +194,6 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
 
         if (avio_read(pb, pkt->data + 8, s->video_chunk_size) !=
             s->video_chunk_size) {
-            av_packet_unref(pkt);
             return CHUNK_EOF;
         }
 
@@ -205,7 +204,6 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
 
             if (avio_read(pb, pkt->data + 8 + s->video_chunk_size,
                 s->decode_map_chunk_size) != s->decode_map_chunk_size) {
-                av_packet_unref(pkt);
                 return CHUNK_EOF;
             }
         }
@@ -217,7 +215,6 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
 
             if (avio_read(pb, pkt->data + 8 + s->video_chunk_size + s->decode_map_chunk_size,
                 s->skip_map_chunk_size) != s->skip_map_chunk_size) {
-                av_packet_unref(pkt);
                 return CHUNK_EOF;
             }
         }