[libav-stable] mpegenc: limit the maximum muxrate

Anton Khirnov git at libav.org
Wed Aug 27 08:25:03 CEST 2014


Module: libav
Branch: master
Commit: 75bbaf2493a71ee66eaabe3c21fadd84d07888de

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Mon Aug 25 21:21:57 2014 +0000

mpegenc: limit the maximum muxrate

It is written to the file as a 22-bit value.

CC: libav-stable at libav.org

---

 libavformat/mpegenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 02437a8..fed03ed 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1162,7 +1162,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
 #define OFFSET(x) offsetof(MpegMuxContext, x)
 #define E AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
-    { "muxrate", NULL,                                          OFFSET(mux_rate), AV_OPT_TYPE_INT, { .i64 =      0 }, 0, INT_MAX, E },
+    { "muxrate", NULL,                                          OFFSET(mux_rate), AV_OPT_TYPE_INT, { .i64 =      0 }, 0, (1 << 22) - 1, E },
     { "preload", "Initial demux-decode delay in microseconds.", OFFSET(preload),  AV_OPT_TYPE_INT, { .i64 = 500000 }, 0, INT_MAX, E },
     { NULL },
 };



More information about the libav-stable mailing list