2016-05-13 10:35 GMT+03:00 wm4 <nfx...@googlemail.com>:

> On Thu, 12 May 2016 22:35:48 +0300
> Andrey Turkin <andrey.tur...@gmail.com> wrote:
>
> > Few functions didn't handle hw_frames_ctx references causing resources
> leaks and even crashes.
> > ---
> >  libavcodec/options.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/libavcodec/options.c b/libavcodec/options.c
> > index ea2563b..8682262 100644
> > --- a/libavcodec/options.c
> > +++ b/libavcodec/options.c
> > @@ -175,6 +175,7 @@ void avcodec_free_context(AVCodecContext **pavctx)
> >      av_freep(&avctx->intra_matrix);
> >      av_freep(&avctx->inter_matrix);
> >      av_freep(&avctx->rc_override);
> > +    av_buffer_unref(&avctx->hw_frames_ctx);
> >
> >      av_freep(pavctx);
> >  }
>
> I would have thought this is the responsibility of the API user?
>
>
AVCodecContext documentation says it is set by a user but then managed and
owned by libavcodec (which is a logical thing to do for any shared
reference).
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to