diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index cd913d32d8..334a5f4a7c 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1179,7 +1179,7 @@ retry_duration: avio_seek(s->pb, fsize - 3 - size, SEEK_SET); if (size == avio_rb24(s->pb) + 11) { uint32_t ts = avio_rb24(s->pb); - ts |= avio_r8(s->pb) << 24; + ts |= (unsigned)avio_r8(s->pb) << 24; if (ts) s->duration = ts * (int64_t)AV_TIME_BASE / 1000; else if (fsize >= 8 && fsize - 8 >= size) {