aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-03-11 07:17:43 +0000
committerDavid Conrad <lessen42@gmail.com>2010-03-11 07:17:43 +0000
commit77560b0ef13664b77efcb765f3b863698fea9e38 (patch)
tree3f9a7f9c215aa009fe6c79d757a1bd327f9811e7
parent32ad8692846ab5cdc8f9d5126f6ac2cf437ee4e9 (diff)
downloadffmpeg-77560b0ef13664b77efcb765f3b863698fea9e38.tar.gz
oggdec: Fix duration calculation for streams with non-zero start
Originally committed as revision 22458 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/oggdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 58b8f96be3..bdbbf3f081 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -460,6 +460,8 @@ ogg_get_length (AVFormatContext * s)
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;