added two pass info

Originally committed as revision 1022 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Fabrice Bellard 23 years ago
parent 1cbc289016
commit 4bfad53561
  1. 15
      libavcodec/utils.c

@ -279,9 +279,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
enc->width, enc->height, enc->width, enc->height,
(float)enc->frame_rate / FRAME_RATE_BASE); (float)enc->frame_rate / FRAME_RATE_BASE);
} }
snprintf(buf + strlen(buf), buf_size - strlen(buf), if (encode) {
", q=%d-%d", enc->qmin, enc->qmax); snprintf(buf + strlen(buf), buf_size - strlen(buf),
", q=%d-%d", enc->qmin, enc->qmax);
}
bitrate = enc->bit_rate; bitrate = enc->bit_rate;
break; break;
case CODEC_TYPE_AUDIO: case CODEC_TYPE_AUDIO:
@ -331,6 +332,14 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
default: default:
av_abort(); av_abort();
} }
if (encode) {
if (enc->flags & CODEC_FLAG_PASS1)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", pass 1");
if (enc->flags & CODEC_FLAG_PASS2)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", pass 2");
}
if (bitrate != 0) { if (bitrate != 0) {
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %d kb/s", bitrate / 1000); ", %d kb/s", bitrate / 1000);

Loading…
Cancel
Save