diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-03-29 14:03:21 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-03-29 14:03:21 +0000 |
commit | da3e23d3758e7c5b38b27c4894f1f0845e5231e9 (patch) | |
tree | fc46d7425d473f313be940b326dc11d7274d5a57 /gst/rtp/gstrtpmp4gpay.c | |
parent | d26cbc8c663b56976224a433c18817be5a57fe45 (diff) |
gst/rtp/: Use more efficient adapter and rtpbuffer methods when possible.
Original commit message from CVS:
* gst/rtp/gstrtpL16depay.c: (gst_rtp_L16_depay_process):
* gst/rtp/gstrtpgsmdepay.c: (gst_rtp_gsm_depay_process):
* gst/rtp/gstrtpilbcdepay.c: (gst_rtp_ilbc_depay_process):
* gst/rtp/gstrtpmp2tdepay.c: (gst_rtp_mp2t_depay_process):
* gst/rtp/gstrtpmp4gdepay.c: (gst_rtp_mp4g_depay_process):
* gst/rtp/gstrtpmp4gpay.c: (gst_rtp_mp4g_pay_flush):
* gst/rtp/gstrtpmp4vdepay.c: (gst_rtp_mp4v_depay_setcaps),
(gst_rtp_mp4v_depay_process):
* gst/rtp/gstrtpmp4vpay.c: (gst_rtp_mp4v_pay_flush):
* gst/rtp/gstrtpmpadepay.c: (gst_rtp_mpa_depay_process):
* gst/rtp/gstrtpmpapay.c: (gst_rtp_mpa_pay_flush):
* gst/rtp/gstrtpmpvdepay.c: (gst_rtp_mpv_depay_process):
* gst/rtp/gstrtppcmadepay.c: (gst_rtp_pcma_depay_process):
* gst/rtp/gstrtppcmudepay.c: (gst_rtp_pcmu_depay_process):
* gst/rtp/gstrtpsv3vdepay.c: (gst_rtp_sv3v_depay_process):
Use more efficient adapter and rtpbuffer methods when possible.
Diffstat (limited to 'gst/rtp/gstrtpmp4gpay.c')
-rw-r--r-- | gst/rtp/gstrtpmp4gpay.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c index fae66c5a..4e4c8174 100644 --- a/gst/rtp/gstrtpmp4gpay.c +++ b/gst/rtp/gstrtpmp4gpay.c @@ -453,7 +453,6 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay) while (avail > 0) { guint towrite; guint8 *payload; - guint8 *data; guint payload_len; guint packet_len; @@ -511,9 +510,8 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay) payload[2] = (total & 0x1fe0) >> 5; payload[3] = (total & 0x1f) << 3; /* we use 13 bits for the size, 3 bits index */ - data = (guint8 *) gst_adapter_peek (rtpmp4gpay->adapter, payload_len); - memcpy (&payload[4], data, payload_len); - + /* copy stuff from adapter to payload */ + gst_adapter_copy (rtpmp4gpay->adapter, &payload[4], 0, payload_len); gst_adapter_flush (rtpmp4gpay->adapter, payload_len); /* marker only if the packet is complete */ |