changeset 741:3be57e506f01 libavcodec

added two pass info
author bellard
date Thu, 10 Oct 2002 17:12:55 +0000
parents 585c163c225a
children 7f77968553de
files utils.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Wed Oct 09 17:18:24 2002 +0000
+++ b/utils.c	Thu Oct 10 17:12:55 2002 +0000
@@ -279,9 +279,10 @@
                      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 @@
     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);