summaryrefslogtreecommitdiff
path: root/libavformat/mpegenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-22 03:29:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-22 06:46:23 +0100
commit887cd591a8ba5a385cfdc84fdd5bb49c278e538c (patch)
tree117a72fd343287a22145c4809a6af5c481dd22ba /libavformat/mpegenc.c
parent018a6645bc606b545e6efdd980d9449c33e09b00 (diff)
mpegpsmux: Fix integer overflow with huge VBV sizes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index dce1786b5e..b42c9afbd8 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1047,7 +1047,7 @@ retry:
StreamInfo *stream = st->priv_data;
const int avail_data= av_fifo_size(stream->fifo);
const int space= stream->max_buffer_size - stream->buffer_index;
- int rel_space= 1024*space / stream->max_buffer_size;
+ int rel_space= 1024LL*space / stream->max_buffer_size;
PacketDesc *next_pkt= stream->premux_packet;
/* for subtitle, a single PES packet must be generated,