avformat/img2enc: remove av_dup_packet() call
authorJames Almer <jamrial@gmail.com>
Tue, 26 Sep 2017 02:14:14 +0000 (23:14 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 26 Sep 2017 02:44:53 +0000 (23:44 -0300)
It's unnecessary after a call to av_packet_ref().

Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/img2enc.c

index 9b60bfc..d793807 100644 (file)
@@ -162,7 +162,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
 
         fmt->pb = pb[0];
         if ((ret = av_packet_ref(&pkt2, pkt))                             < 0 ||
-            (ret = av_dup_packet(&pkt2))                                  < 0 ||
             (ret = avcodec_parameters_copy(st->codecpar, s->streams[0]->codecpar)) < 0 ||
             (ret = avformat_write_header(fmt, NULL))                      < 0 ||
             (ret = av_interleaved_write_frame(fmt, &pkt2))                < 0 ||