On Mon, Dec 09, 2013 at 12:11:39PM +0100, Anton Khirnov wrote:
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3121,8 +3122,11 @@ void avcodec_get_frame_defaults(AVFrame *frame);
> * @warning this function does NOT free the data buffers themselves
> * (it does not know how, since they might have been allocated with
> * a custom get_buffer()).
> + *
> + * @deprecated use av_frame_free()
> */
> void avcodec_free_frame(AVFrame **frame);
missing attribute_deprecated
> +#endif
extra good karma for commenting the #endif
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -827,22 +827,12 @@ AVFrame *avcodec_alloc_frame(void)
> return frame;
> }
> -#endif
>
> void avcodec_free_frame(AVFrame **frame)
> {
> - AVFrame *f;
> -
> - if (!frame || !*frame)
> - return;
> -
> - f = *frame;
> -
> - if (f->extended_data != f->data)
> - av_freep(&f->extended_data);
> -
> - av_freep(frame);
> + av_frame_free(frame);
> }
> +#endif
same
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel