[FFmpeg-cvslog] mpegpsmux: Fix integer overflow with huge VBV sizes.
Michael Niedermayer
git at videolan.org
Sun Jan 22 07:05:30 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 22 03:29:32 2012 +0100| [887cd591a8ba5a385cfdc84fdd5bb49c278e538c] | committer: Michael Niedermayer
mpegpsmux: Fix integer overflow with huge VBV sizes.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=887cd591a8ba5a385cfdc84fdd5bb49c278e538c
---
libavformat/mpegenc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index dce1786..b42c9af 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,
More information about the ffmpeg-cvslog
mailing list