diff mbox series

[FFmpeg-devel,v2,2/6] avcodec/flashsvenc: Remove unused buffer

Message ID AS8P250MB0744363C12C3151DF760BBB08F0A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 44c09e86c7bc4e475c89e07de65aa938033cad0a
Headers show
Series [FFmpeg-devel,v2,1/6] avcodec/flashsvenc: Fix packet size calculation | expand

Checks

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

Commit Message

Andreas Rheinhardt Nov. 21, 2022, 1:07 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 4cedb53fe4..d627b12351 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -64,7 +64,6 @@  typedef struct FlashSVContext {
     int             image_width, image_height;
     unsigned        packet_size;
     int             block_width, block_height;
-    uint8_t        *encbuffer;
     int             block_size;
     int             last_key_frame;
     uint8_t         tmpblock[3 * 256 * 256];
@@ -95,7 +94,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;
@@ -124,13 +122,6 @@  static av_cold int flashsv_encode_init(AVCodecContext *avctx)
     nb_blocks = h_blocks * v_blocks;
     s->packet_size = 4 + nb_blocks * (2 + 3 * BLOCK_WIDTH * BLOCK_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;
 }