avformat: replace all uses of av_copy_packet()
[ffmpeg.git] / libavformat / img2enc.c
index 87b5ec2..9b60bfc 100644 (file)
@@ -161,7 +161,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
         st->id = pkt->stream_index;
 
         fmt->pb = pb[0];
-        if ((ret = av_copy_packet(&pkt2, pkt))                            < 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 ||