[FFmpeg-devel] [PATCH] Keep track of stream duration and nb_frames when muxing
David Conrad
lessen42
Tue Jan 19 07:41:57 CET 2010
On Jan 19, 2010, at 12:25 AM, Baptiste Coudurier wrote:
> Hi,
>
> On 1/18/10 9:18 PM, David Conrad wrote:
>> Hi,
>>
>> [...]
>>
>> @@ -2785,6 +2791,11 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
>> if(compute_pkt_fields2(s, st, pkt)< 0&& !(s->oformat->flags& AVFMT_NOTIMESTAMPS))
>> return -1;
>>
>> + if (!st->nb_frames)
>> + st->start_time = pkt->pts;
>> + st->duration = pkt->pts + pkt->duration;
>
> st->duration = FFMAX(st->duration, pkt->pts + pkt->duration);
>
> and same above, is more correct.
Whoops, fixed
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-1-streamstats.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100119/e454790e/attachment.txt>
More information about the ffmpeg-devel
mailing list