On 3/20/2020 10:31 AM, Paul B Mahol wrote: > +static av_cold int bink2_decode_end(AVCodecContext *avctx) > +{ > + Bink2Context * const c = avctx->priv_data; > + > + av_frame_free(&c->last); > + av_freep(&c->current_q); > + av_freep(&c->prev_q); > + av_freep(&c->current_dc); > + av_freep(&c->prev_dc); > + av_freep(&c->current_idc); > + av_freep(&c->prev_idc); > + av_freep(&c->current_mv); > + av_freep(&c->prev_mv); > + av_freep(&c->col_cbp); > + av_freep(&c->row_cbp); > + > + return 0; > +} > + > +AVCodec ff_bink2_decoder = { > + .name = "binkvideo2", > + .long_name = NULL_IF_CONFIG_SMALL("Bink video 2"), > + .type = AVMEDIA_TYPE_VIDEO, > + .id = AV_CODEC_ID_BINKVIDEO2, > + .priv_data_size = sizeof(Bink2Context), > + .init = bink2_decode_init, > + .close = bink2_decode_end, > + .decode = bink2_decode_frame, > + .capabilities = AV_CODEC_CAP_DR1, > +};
Missing a flush() callback unreffing c->last, and probably also zeroing some of the above arrays. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".