On Thu, Apr 9, 2015 at 4:46 PM, Diego Biurrun <[email protected]> wrote: > On Thu, Apr 09, 2015 at 11:48:40AM +0200, Vittorio Giovara wrote: >> --- a/libavcodec/hqx.c >> +++ b/libavcodec/hqx.c >> @@ -626,10 +626,7 @@ static av_cold int hqx_decode_close(AVCodecContext >> *avctx) >> static av_cold int hqx_decode_init(AVCodecContext *avctx) >> { >> HQXContext *ctx = avctx->priv_data; >> - int ret = ff_hqx_init_vlcs(ctx); >> - if (ret < 0) >> - hqx_decode_close(avctx); >> - return ret; >> + return ff_hqx_init_vlcs(ctx); >> } >> >> AVCodec ff_hqx_decoder = { >> @@ -642,4 +639,6 @@ AVCodec ff_hqx_decoder = { >> .decode = hqx_decode_frame, >> .close = hqx_decode_close, >> .capabilities = CODEC_CAP_DR1, >> + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | >> + FF_CODEC_CAP_INIT_CLEANUP, >> }; > > This looks very, very wrong to me, where is the cleanup happening now?
Since the codec is marked FF_CODEC_CAP_INIT_CLEANUP cleanup is done within avcodec_open2(). -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
