avcodec/dsicinvideo: Remove redundant code for freeing

The dsicinvideo decoder already has the FF_CODEC_CAP_INIT_CLEANUP flag
set, so it is unnecessary to directly clean up some already allocated
buffers in case another one could not be allocated in the init function,
as all buffers will be freed anyway later in the decoder's close
function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/351/head
Andreas Rheinhardt 5 years ago
parent 3c2128df7f
commit 39638ace67
  1. 1
      libavcodec/dsicinvideo.c

@ -58,7 +58,6 @@ static av_cold int allocate_buffers(CinVideoContext *cin)
cin->bitmap_table[i] = av_mallocz(cin->bitmap_size);
if (!cin->bitmap_table[i]) {
av_log(cin->avctx, AV_LOG_ERROR, "Can't allocate bitmap buffers.\n");
destroy_buffers(cin);
return AVERROR(ENOMEM);
}
}

Loading…
Cancel
Save