[FFmpeg-cvslog] r22458 - trunk/libavformat/oggdec.c

Reimar Döffinger Reimar.Doeffinger
Thu Mar 11 18:48:15 CET 2010


On Thu, Mar 11, 2010 at 08:17:43AM +0100, conrad wrote:
> Author: conrad
> Date: Thu Mar 11 08:17:43 2010
> New Revision: 22458
> 
> Log:
> oggdec: Fix duration calculation for streams with non-zero start
> 
> Modified:
>    trunk/libavformat/oggdec.c
> 
> Modified: trunk/libavformat/oggdec.c
> ==============================================================================
> --- trunk/libavformat/oggdec.c	Thu Mar 11 08:17:40 2010	(r22457)
> +++ trunk/libavformat/oggdec.c	Thu Mar 11 08:17:43 2010	(r22458)
> @@ -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;

Does this actually work nowadays?
I think the last time I tried, start_time was only ever set for one stream,
so it would leave the durations wrong for all but one stream...



More information about the ffmpeg-cvslog mailing list