diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2002-10-10 17:12:55 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2002-10-10 17:12:55 +0000 |
commit | 4bfad535616048d0aa97f30f0b092647d3bed062 (patch) | |
tree | 7d774ccd2951a70364ed2bd814e41596b7995ac5 /libavcodec | |
parent | 1cbc289016b794eadfd263528f904f601f93cedd (diff) | |
download | ffmpeg-4bfad535616048d0aa97f30f0b092647d3bed062.tar.gz |
added two pass info
Originally committed as revision 1022 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8271d4c648..b22b8fcf28 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -279,9 +279,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) enc->width, enc->height, (float)enc->frame_rate / FRAME_RATE_BASE); } - snprintf(buf + strlen(buf), buf_size - strlen(buf), - ", q=%d-%d", enc->qmin, enc->qmax); - + if (encode) { + snprintf(buf + strlen(buf), buf_size - strlen(buf), + ", q=%d-%d", enc->qmin, enc->qmax); + } bitrate = enc->bit_rate; break; case CODEC_TYPE_AUDIO: @@ -331,6 +332,14 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) default: 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) { snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %d kb/s", bitrate / 1000); |