diff mbox

[FFmpeg-devel] avcodec/avpacket: deprecate av_copy_packet_side_data()

Message ID 20170925202025.8908-1-jamrial@gmail.com
State Accepted
Commit cf3d2d52b59ddfc2a7c65a8e66f7698c4b837e51
Headers show

Commit Message

James Almer Sept. 25, 2017, 8:20 p.m. UTC
It leaks memory and destroys the dst packet in case of failure, and it
ultimately duplicates functionality already existing in the saner
av_packet_copy_props().

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

James Almer Oct. 1, 2017, 10:33 p.m. UTC | #1
On 9/25/2017 5:20 PM, James Almer wrote:
> It leaks memory and destroys the dst packet in case of failure, and it
> ultimately duplicates functionality already existing in the saner
> av_packet_copy_props().
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/avcodec.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 5c84974e03..bca9f30de3 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -4621,7 +4621,10 @@ int av_copy_packet(AVPacket *dst, const AVPacket *src);
>   * Copy packet side data
>   *
>   * @return 0 on success, negative AVERROR on fail
> + *
> + * @deprecated Use av_packet_copy_props
>   */
> +attribute_deprecated
>  int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
>  
>  /**

Pushed.
diff mbox

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5c84974e03..bca9f30de3 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4621,7 +4621,10 @@  int av_copy_packet(AVPacket *dst, const AVPacket *src);
  * Copy packet side data
  *
  * @return 0 on success, negative AVERROR on fail
+ *
+ * @deprecated Use av_packet_copy_props
  */
+attribute_deprecated
 int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
 
 /**