Add duration field support to mad - thanks to Joshua
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 7 Jun 2003 00:28:20 +0000 (00:28 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 7 Jun 2003 00:28:20 +0000 (00:28 +0000)
Original commit message from CVS:
Add duration field support to mad - thanks to Joshua

ext/mad/gstmad.c

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