[FFmpeg-cvslog] avcodec/libutvideodec: free coded_frame with av_frame_free() instead if av_free*

Geek.Song ffmpeg at gmail.com
Tue Dec 10 04:19:03 CET 2013


On Tue, Dec 10, 2013 at 8:18 AM, Michael Niedermayer <git at videolan.org>wrote:

> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue
> Dec 10 00:52:12 2013 +0100| [7102083a26f77b316b78d985c6b86f6d955910b9] |
> committer: Michael Niedermayer
>
> avcodec/libutvideodec: free coded_frame with av_frame_free() instead if
> av_free*
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>
> >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7102083a26f77b316b78d985c6b86f6d955910b9
> ---
>
>  libavcodec/libutvideodec.cpp |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp
> index 8e6b691..60dbd15 100644
> --- a/libavcodec/libutvideodec.cpp
> +++ b/libavcodec/libutvideodec.cpp
> @@ -174,7 +174,7 @@ static av_cold int utvideo_decode_close(AVCodecContext
> *avctx)
>      UtVideoContext *utv = (UtVideoContext *)avctx->priv_data;
>
>      /* Free output */
> -    av_freep(&avctx->coded_frame);
> +    av_frame_free(&avctx->coded_frame);
>      av_freep(&utv->buffer);
>

IMHO, a decoder should not touch avctx->coded_frame which is declared in
definition of  "decoding: unused".

I think all code related in "coded_frame" in libutvideodec.cpp should be
rewrited


More information about the ffmpeg-cvslog mailing list