aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-01 13:08:04 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-01 13:08:04 +0000
commit99fb79b55ad9e6be52c16f2fd794f350bd76154a (patch)
treedf2914fce7d9144d4f8d122e0e241f04166cf9c1
parentc27fc644d445f0ab8279f80bddb4bd32a635f0bf (diff)
downloadffmpeg-99fb79b55ad9e6be52c16f2fd794f350bd76154a.tar.gz
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) Originally committed as revision 11728 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 555abe03f2..3b2814a688 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -954,7 +954,8 @@ static void print_report(AVFormatContext **output_files,
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 **output_files,
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){