diff mbox series

[FFmpeg-devel,8/9] fftools/ffmpeg: merge variable declaration and initialization

Message ID 20220511081654.15127-8-anton@khirnov.net
State Accepted
Commit 0c914ebd533826b20212e10896c175ff379470cf
Headers show
Series [FFmpeg-devel,1/9] fftools/ffmpeg: share the code encoding a single frame between video and audio | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 11, 2022, 8:16 a.m. UTC
---
 fftools/ffmpeg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 5983c57410..fe7c37db62 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -837,7 +837,7 @@  static double psnr(double d)
 
 static void do_video_stats(OutputStream *ost, const AVPacket *pkt)
 {
-    AVCodecContext *enc;
+    AVCodecContext *enc = ost->enc_ctx;
     int frame_number;
     double ti1, bitrate, avg_bitrate;
 
@@ -850,7 +850,6 @@  static void do_video_stats(OutputStream *ost, const AVPacket *pkt)
         }
     }
 
-    enc = ost->enc_ctx;
     frame_number = ost->packets_encoded;
     if (vstats_version <= 1) {
         fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number,