avformat: replace all uses of av_copy_packet()
[ffmpeg.git] / libavformat / apngenc.c
index d4191c0..77c1c91 100644 (file)
@@ -218,7 +218,7 @@ static int flush_packet(AVFormatContext *format_context, AVPacket *packet)
 
     av_packet_unref(apng->prev_packet);
     if (packet)
-        av_copy_packet(apng->prev_packet, packet);
+        av_packet_ref(apng->prev_packet, packet);
     return 0;
 }
 
@@ -232,7 +232,7 @@ static int apng_write_packet(AVFormatContext *format_context, AVPacket *packet)
         if (!apng->prev_packet)
             return AVERROR(ENOMEM);
 
-        av_copy_packet(apng->prev_packet, packet);
+        av_packet_ref(apng->prev_packet, packet);
     } else {
         ret = flush_packet(format_context, packet);
         if (ret < 0)