[FFmpeg-cvslog] avdevice/avfoundation: remove write-only variable

Marvin Scholz git at videolan.org
Thu Sep 26 01:35:49 EEST 2024


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Jul 12 18:09:43 2024 +0200| [399bf3f0407998410e9a169b26d9d56292158810] | committer: Marvin Scholz

avdevice/avfoundation: remove write-only variable

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=399bf3f0407998410e9a169b26d9d56292158810
---

 libavdevice/avfoundation.m | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index c5a09c6563..61dac4b713 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);



More information about the ffmpeg-cvslog mailing list