]> git.sesse.net Git - ffmpeg/commitdiff
mpegpsmux: Fix integer overflow with huge VBV sizes.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Jan 2012 02:29:32 +0000 (03:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Jan 2012 05:46:23 +0000 (06:46 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegenc.c

index dce1786b5e2774655de202290153066a592e8051..b42c9afbd81c5f27b2489221741d823626e37983 100644 (file)
@@ -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,