Commit 887cd591 authored by Michael Niedermayer's avatar Michael Niedermayer

mpegpsmux: Fix integer overflow with huge VBV sizes.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 018a6645
...@@ -1047,7 +1047,7 @@ retry: ...@@ -1047,7 +1047,7 @@ retry:
StreamInfo *stream = st->priv_data; StreamInfo *stream = st->priv_data;
const int avail_data= av_fifo_size(stream->fifo); const int avail_data= av_fifo_size(stream->fifo);
const int space= stream->max_buffer_size - stream->buffer_index; 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; PacketDesc *next_pkt= stream->premux_packet;
/* for subtitle, a single PES packet must be generated, /* for subtitle, a single PES packet must be generated,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment