avcodec/avpacket: deprecate av_copy_packet()
authorJames Almer <jamrial@gmail.com>
Sat, 23 Sep 2017 18:59:56 +0000 (15:59 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 26 Sep 2017 00:22:06 +0000 (21:22 -0300)
It does the same thing as av_packet_ref().

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/avcodec.h
libavcodec/avpacket.c

index 5c84974..07d9f3e 100644 (file)
@@ -4614,7 +4614,10 @@ int av_dup_packet(AVPacket *pkt);
  * Copy packet, including contents
  *
  * @return 0 on success, negative AVERROR on fail
+ *
+ * @deprecated Use av_packet_ref
  */
+attribute_deprecated
 int av_copy_packet(AVPacket *dst, const AVPacket *src);
 
 /**
index 5ce3228..b07180e 100644 (file)
@@ -247,8 +247,6 @@ failed_alloc:
     av_packet_unref(pkt);
     return AVERROR(ENOMEM);
 }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
 int av_dup_packet(AVPacket *pkt)
 {
@@ -266,6 +264,8 @@ int av_copy_packet(AVPacket *dst, const AVPacket *src)
     *dst = *src;
     return copy_packet_data(dst, src, 0);
 }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
 
 void av_packet_free_side_data(AVPacket *pkt)
 {