Message ID | 20201115090012.26055-1-robux4@ycbcr.xyz |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/matroskadec: update the end timestamp when there is a timestamp | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 137674c068..8a5bc4018a 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3626,7 +3626,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, AVBufferRef *buf if (!block_duration && trust_default_duration) block_duration = track->default_duration * laces / matroska->time_scale; - if (cluster_time != (uint64_t)-1 && (block_time >= 0 || cluster_time >= -block_time)) + if (timecode != AV_NOPTS_VALUE) track->end_timecode = FFMAX(track->end_timecode, timecode + block_duration);