OSDN Git Service

Show max bitrate for mpeg2 video streams in avcodec_string().
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 25 Jul 2013 08:53:47 +0000 (10:53 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 25 Jul 2013 17:08:19 +0000 (19:08 +0200)
See also 25b7aa9

libavcodec/utils.c

index 20d487c..50448b4 100644 (file)
@@ -2650,6 +2650,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
     if (bitrate != 0) {
         snprintf(buf + strlen(buf), buf_size - strlen(buf),
                  ", %d kb/s", bitrate / 1000);
+    } else if (enc->rc_max_rate > 0) {
+        snprintf(buf + strlen(buf), buf_size - strlen(buf),
+                 ", max. %d kb/s", enc->rc_max_rate / 1000);
     }
 }