Commit 99fb79b5 authored by Baptiste Coudurier's avatar Baptiste Coudurier

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
parent c27fc644
......@@ -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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment