[FFmpeg-cvslog] r22458 - trunk/libavformat/oggdec.c
David Conrad
lessen42
Thu Mar 11 20:34:53 CET 2010
On Mar 11, 2010, at 12:48 PM, Reimar D?ffinger wrote:
> 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...
Before r22457, start_time shouldn't have ever been set (or anything other than 0)
So this only works for ogg with skeleton, which is also I think the only real case in which ogg doesn't start at 0.
More information about the ffmpeg-cvslog
mailing list