aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 02:26:37 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-15 19:25:26 +0200
commit39638ace670afd95b7094471a41f71af8c0cad33 (patch)
tree4cd727ad94fd846bf0457ec283e254747e4da05c
parent3c2128df7ffdb32a3ef34044f9a4c2f15dc1776f (diff)
downloadffmpeg-39638ace670afd95b7094471a41f71af8c0cad33.tar.gz
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>
-rw-r--r--libavcodec/dsicinvideo.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c
index 7f74808e6d..52f660fb51 100644
--- a/libavcodec/dsicinvideo.c
+++ b/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);
}
}