Browse Source

lavf: fix the comparison in an overflow check

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.1
Anton Khirnov Luca Barbato 11 years ago
parent
commit
26f027fba1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/utils.c

+ 1
- 1
libavformat/utils.c View File

@@ -1758,7 +1758,7 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (st->codec->bit_rate > 0) {
if (INT_MAX - st->codec->bit_rate > bit_rate) {
if (INT_MAX - st->codec->bit_rate < bit_rate) {
bit_rate = 0;
break;
}


Loading…
Cancel
Save