diff mbox series

[FFmpeg-devel,04/11] avdevice/avfoundation: remove write-only variable

Message ID D2NQZKJWIGWO.15BQ01635K64B@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/11] avdevice/audiotoolbox: fix mixed declaration and code | expand

Checks

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

Commit Message

Marvin Scholz July 12, 2024, 4:09 p.m. UTC
The block_buffer was only ever written to but then never used in the
following code, making it unnecessary.

Fixes a "variable 'block_buffer' set but not used" compiler warning.
---
 libavdevice/avfoundation.m | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 17900d39d9..72a7f24b7d 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -632,7 +632,6 @@  static int get_video_config(AVFormatContext *s)
 {
     AVFContext *ctx = (AVFContext*)s->priv_data;
     CVImageBufferRef image_buffer;
-    CMBlockBufferRef block_buffer;
     CGSize image_buffer_size;
     AVStream* stream = avformat_new_stream(s, NULL);
 
@@ -652,7 +651,6 @@  static int get_video_config(AVFormatContext *s)
     avpriv_set_pts_info(stream, 64, 1, avf_time_base);
 
     image_buffer = CMSampleBufferGetImageBuffer(ctx->current_frame);
-    block_buffer = CMSampleBufferGetDataBuffer(ctx->current_frame);
 
     if (image_buffer) {
         image_buffer_size = CVImageBufferGetEncodedSize(image_buffer);