diff mbox series

[FFmpeg-devel,3/7] avcodec/flashsvenc: Remove unused buffer

Message ID AS8P250MB0744EA07171EE1B273DD4E078F089@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Superseded
Headers show
Series [FFmpeg-devel,1/7] avcodec/pnmenc: Check av_image_get_buffer_size() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 19, 2022, 2:59 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/flashsvenc.c | 9 ---------
 1 file changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 9d065bb92d..0618b2aa1b 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -60,7 +60,6 @@  typedef struct FlashSVContext {
     uint8_t        *previous_frame;
     int             image_width, image_height;
     int             block_width, block_height;
-    uint8_t        *encbuffer;
     int             block_size;
     int             last_key_frame;
     uint8_t         tmpblock[3 * 256 * 256];
@@ -91,7 +90,6 @@  static av_cold int flashsv_encode_end(AVCodecContext *avctx)
 {
     FlashSVContext *s = avctx->priv_data;
 
-    av_freep(&s->encbuffer);
     av_freep(&s->previous_frame);
 
     return 0;
@@ -114,13 +112,6 @@  static av_cold int flashsv_encode_init(AVCodecContext *avctx)
     s->image_width  = avctx->width;
     s->image_height = avctx->height;
 
-    s->encbuffer = av_mallocz(s->image_width * s->image_height * 3);
-
-    if (!s->encbuffer) {
-        av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
-        return AVERROR(ENOMEM);
-    }
-
     return 0;
 }