Add duration field support to mad - thanks to Joshua

Original commit message from CVS:
Add duration field support to mad - thanks to Joshua
This commit is contained in:
Ronald S. Bultje 2003-06-07 00:28:20 +00:00
parent 264e1f15e2
commit ef073e6ce2

View File

@ -1268,8 +1268,8 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
} }
time_offset = mad->total_samples * GST_SECOND time_offset = mad->total_samples * GST_SECOND
/ mad->frame.header.samplerate; / mad->frame.header.samplerate;
time_duration = ((mad->total_samples + nsamples) * GST_SECOND time_duration = (nsamples * GST_SECOND
/ mad->frame.header.samplerate) - time_offset; / mad->frame.header.samplerate);
} }
if (mad->index) { if (mad->index) {