static av_cold int tiff_end(AVCodecContext *avctx)
{
    TiffContext *const s = avctx->priv_data;

    free_geotags(s);

    ff_lzw_decode_close(&s->lzw);
    if (s->picture.data[0])
        avctx->release_buffer(avctx, &s->picture);
    return 0;
}