summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-08-10 15:37:55 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-08-10 15:37:55 +0000
commit9c3e2f78a04200e604add6139ba6f64078fa2274 (patch)
tree62f289374473d820ce09bb7d16661655651a34a4 /libavformat
parentf38e2b13bd4f1d35ae799976c766c72070b3a894 (diff)
ensure that negative block_time are properly checked
(workaround unsigned comparison) Originally committed as revision 10058 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 5430821eb4..ace9917929 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2382,7 +2382,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
int real_v = matroska->tracks[track]->flags & MATROSKA_TRACK_REAL_V;
uint64_t timecode = AV_NOPTS_VALUE;
- if (cluster_time != (uint64_t)-1 && cluster_time + block_time >= 0)
+ if (cluster_time != (uint64_t)-1
+ && (block_time >= 0 || cluster_time >= -block_time))
timecode = cluster_time + block_time;
for (n = 0; n < laces; n++) {