[FFmpeg-devel] [PATCH 12/25] fftools/ffmpeg: drop a superfluous stack variable

Anton Khirnov anton at khirnov.net
Wed Aug 3 16:58:31 EEST 2022


---
 fftools/ffmpeg.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 47f9a6137f..f12364fe0a 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3904,16 +3904,14 @@ static int process_input(int file_index)
         return ret;
     }
     if (ret < 0 && ifile->loop) {
-        AVCodecContext *avctx;
         for (i = 0; i < ifile->nb_streams; i++) {
             ist = input_streams[ifile->ist_index + i];
-            avctx = ist->dec_ctx;
             if (ist->processing_needed) {
                 ret = process_input_packet(ist, NULL, 1);
                 if (ret>0)
                     return 0;
                 if (ist->decoding_needed)
-                    avcodec_flush_buffers(avctx);
+                    avcodec_flush_buffers(ist->dec_ctx);
             }
         }
         free_input_thread(file_index);
-- 
2.34.1



More information about the ffmpeg-devel mailing list