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

Michael Niedermayer michaelni at gmx.at
Tue Dec 10 04:38:23 CET 2013


On Tue, Dec 10, 2013 at 11:19:03AM +0800, Geek.Song wrote:
> 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

yes, i think so too

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20131210/87c8691e/attachment.asc>


More information about the ffmpeg-cvslog mailing list