diff mbox series

[FFmpeg-devel,4/4] avcodec/libxvid: Remove set-but-unused variable

Message ID 20210319005244.1737816-4-andreas.rheinhardt@gmail.com
State Accepted
Commit 578539564a3d3e17dc629d73688797c308c08c9e
Headers show
Series [FFmpeg-devel,1/4] avformat/tests/fifo_muxer: Fix leak of AVPacket on error
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 19, 2021, 12:52 a.m. UTC
Set-but-unused since 2101b99777860c853ca2321031eb3f4047dc5894.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
Before 2101b99777 the packet was only unreferenced on success
so that said commit seems to have fixed a potential memleak.

 libavcodec/libxvid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 25b0025d5f..50601807a7 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -685,7 +685,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
     if (x->quicktime_format) {
         AVFrame *picture;
         AVPacket *packet;
-        int size, got_packet, ret;
+        int size, got_packet;
 
         packet = av_packet_alloc();
         if (!packet)
@@ -716,7 +716,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
         picture->data[2] = picture->data[1] + size / 4;
         memset(picture->data[0], 0, size);
         memset(picture->data[1], 128, size / 2);
-        ret = xvid_encode_frame(avctx, packet, picture, &got_packet);
+        xvid_encode_frame(avctx, packet, picture, &got_packet);
         av_packet_free(&packet);
         av_free(picture->data[0]);
         av_frame_free(&picture);