rtpamrpay: proper duration for multiple frame payload
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 18 Aug 2010 09:42:33 +0000 (11:42 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 6 Sep 2010 12:47:02 +0000 (14:47 +0200)
gst/rtp/gstrtpamrpay.c

index a261046fcc5da1268aa756f387f40ef516f568b1..2ade6a757ccce6d27464bee9f8d9ef20dbf1eef8 100644 (file)
@@ -262,11 +262,10 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
   /* copy timestamp */
   GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
 
-  /* FIXME: when we do more than one AMR frame per packet, fix this */
   if (duration != GST_CLOCK_TIME_NONE)
     GST_BUFFER_DURATION (outbuf) = duration;
   else {
-    GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND;
+    GST_BUFFER_DURATION (outbuf) = num_packets * 20 * GST_MSECOND;
   }
 
   if (GST_BUFFER_IS_DISCONT (buffer)) {