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

James Almer jamrial at gmail.com
Mon Oct 2 01:33:28 EEST 2017


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 at 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.


More information about the ffmpeg-devel mailing list