[FFmpeg-cvslog] r11728 - trunk/ffmpeg.c

bcoudurier subversion
Fri Feb 1 14:08:05 CET 2008


Author: bcoudurier
Date: Fri Feb  1 14:08:04 2008
New Revision: 11728

Log:
Do not print quality when stream copy,
Silence valgrind complaint:
==14746== Conditional jump or move depends on uninitialised value(s)
==14746==    at 0x43488DF: (within /lib/i686/cmov/libc-2.7.so)
==14746==    by 0x434ED81: __printf_fp (in /lib/i686/cmov/libc-2.7.so)
==14746==    by 0x434A3F3: vfprintf (in /lib/i686/cmov/libc-2.7.so)
==14746==    by 0x436EA93: vsnprintf (in /lib/i686/cmov/libc-2.7.so)
==14746==    by 0x4353234: snprintf (in /lib/i686/cmov/libc-2.7.so)
==14746==    by 0x806247C: print_report (ffmpeg.c:963)



Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Fri Feb  1 14:08:04 2008
@@ -954,7 +954,8 @@ static void print_report(AVFormatContext
         enc = ost->st->codec;
         if (vid && enc->codec_type == CODEC_TYPE_VIDEO) {
             snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ",
-                    enc->coded_frame->quality/(float)FF_QP2LAMBDA);
+                     enc->coded_frame && !ost->st->stream_copy ?
+                     enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
         }
         if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) {
             float t = (av_gettime()-timer_start) / 1000000.0;
@@ -962,7 +963,8 @@ static void print_report(AVFormatContext
             frame_number = ost->frame_number;
             snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "frame=%5d fps=%3d q=%3.1f ",
                      frame_number, (t>1)?(int)(frame_number/t+0.5) : 0,
-                     enc->coded_frame ? enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
+                     enc->coded_frame && !ost->st->stream_copy ?
+                     enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
             if(is_last_report)
                 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "L");
             if(qp_hist && enc->coded_frame){




More information about the ffmpeg-cvslog mailing list