rtpamrpay: Remove unneeded variable, the value is only read once.

This commit is contained in:
Edward Hervey 2009-04-18 18:47:05 +02:00
parent f6458e2c4c
commit f6b774fbcc

View file

@ -207,7 +207,6 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
gint i, num_packets, num_nonempty_packets; gint i, num_packets, num_nonempty_packets;
gint amr_len; gint amr_len;
gint *frame_size; gint *frame_size;
gboolean discont;
rtpamrpay = GST_RTP_AMR_PAY (basepayload); rtpamrpay = GST_RTP_AMR_PAY (basepayload);
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpamrpay); mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpamrpay);
@ -216,7 +215,6 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
data = GST_BUFFER_DATA (buffer); data = GST_BUFFER_DATA (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer); timestamp = GST_BUFFER_TIMESTAMP (buffer);
duration = GST_BUFFER_DURATION (buffer); duration = GST_BUFFER_DURATION (buffer);
discont = GST_BUFFER_IS_DISCONT (buffer);
/* setup frame size pointer */ /* setup frame size pointer */
if (rtpamrpay->mode == GST_RTP_AMR_P_MODE_NB) if (rtpamrpay->mode == GST_RTP_AMR_P_MODE_NB)
@ -275,11 +273,10 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND; GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND;
} }
if (discont) { if (GST_BUFFER_IS_DISCONT (buffer)) {
GST_DEBUG_OBJECT (basepayload, "discont, setting marker bit"); GST_DEBUG_OBJECT (basepayload, "discont, setting marker bit");
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
gst_rtp_buffer_set_marker (outbuf, TRUE); gst_rtp_buffer_set_marker (outbuf, TRUE);
discont = FALSE;
} }
/* get payload, this is now writable */ /* get payload, this is now writable */