# HG changeset patch # User conrad # Date 1268291863 0 # Node ID e6cd8ca154f50d080e531f2982784af1765ca164 # Parent c66b238d4d33c843f508e08f8314dfd314b0ff26 oggdec: Fix duration calculation for streams with non-zero start diff -r c66b238d4d33 -r e6cd8ca154f5 oggdec.c --- a/oggdec.c Thu Mar 11 07:17:40 2010 +0000 +++ b/oggdec.c Thu Mar 11 07:17:43 2010 +0000 @@ -460,6 +460,8 @@ if (idx != -1){ s->streams[idx]->duration = ogg_gptopts (s, idx, ogg->streams[idx].granule, NULL); + if (s->streams[idx]->start_time != AV_NOPTS_VALUE) + s->streams[idx]->duration -= s->streams[idx]->start_time; } ogg->size = size;