Merge commit 'aade60ab165716523788cd11caf03ae61b40144a' into release/1.1
* commit 'aade60ab165716523788cd11caf03ae61b40144a': matroskadec: Check that .lang was allocated and set before reading it alac: Limit max_samples_per_frame ape demuxer: check for EOF in potentially long loops 4xm: check that bits per sample is strictly positive lavf: avoid integer overflow when estimating bitrate pictordec: pass correct context to avpriv_request_sample Conflicts: libavcodec/pictordec.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2261,8 +2261,13 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
|
||||
bit_rate = 0;
|
||||
for(i=0;i<ic->nb_streams;i++) {
|
||||
st = ic->streams[i];
|
||||
if (st->codec->bit_rate > 0)
|
||||
bit_rate += st->codec->bit_rate;
|
||||
if (st->codec->bit_rate > 0) {
|
||||
if (INT_MAX - st->codec->bit_rate > bit_rate) {
|
||||
bit_rate = 0;
|
||||
break;
|
||||
}
|
||||
bit_rate += st->codec->bit_rate;
|
||||
}
|
||||
}
|
||||
ic->bit_rate = bit_rate;
|
||||
}
|
||||
|
Reference in New Issue
Block a user