On Fri,  9 Aug 2013 18:24:47 +0200, Luca Barbato <[email protected]> wrote:
> Provide a clean way to manipulate packets.
> ---
>  doc/APIchanges        |   4 ++
>  libavcodec/avcodec.h  |  62 ++++++++++++++++++++++++++++++
>  libavcodec/avpacket.c | 104 
> ++++++++++++++++++++++++++++++++++++++++++++------
>  libavcodec/version.h  |   2 +-
>  4 files changed, 159 insertions(+), 13 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 9402d44..2b3b58d 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,10 @@ libavutil:     2012-10-22
>  
>  API changes, most recent first:
>  
> +2013-08-xx - xxxxxxx - lavc 55.16.0 - avcodec.h
> +  Extend AVPacket API with av_packet_unref, av_packet_ref,
> +  av_packet_move_ref, av_packet_copy_props, av_packet_free_side_data.
> +
>  2013-08-xx - xxxxxxx - lavc 55.13.0 - avcodec.h
>    Deprecate the bitstream-related members from struct AVVDPAUContext.
>    The bistream buffers no longer need to be explicitly freed.
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index adfd25a..96683b0 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3229,6 +3229,68 @@ uint8_t* av_packet_get_side_data(AVPacket *pkt, enum 
> AVPacketSideDataType type,
>                                   int *size);
>  
>  /**
> + * Convenience function to free all the side data stored.
> + * All the other fields stay untouched.
> + *
> + * @param pkt packet
> + */
> +void av_packet_free_side_data(AVPacket *pkt);
> +
> +/**
> + * Setup a new reference to the data described by an given packet

_a_ given packet

> + *
> + * If src is reference-counted, setup dst as a new reference to the
> + * buffer in src. Otherwise allocate a new buffer in dst and copy the
> + * data from src into it.
> + *
> + * All the other fields are copied from src.
> + *
> + * @note dst must not contain references.

Not true.

Fix those two details and feel free to push, if noone else has other comments.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to