summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtpamrdepay.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-02-17 15:37:38 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-02-17 15:37:38 +0000
commitb0d0113b8e4cf76363f8f94c5ae5352425a861b9 (patch)
tree793d0d48e3015512ec7d2f1887785e5218191094 /gst/rtp/gstrtpamrdepay.c
parent732b9fe817890bb17f4930f823dfbc19e08147dc (diff)
gst/rtp/gstrtpamrdepay.c: Patch from Sebastien Cote, fixes #319884
Original commit message from CVS: * gst/rtp/gstrtpamrdepay.c: (gst_rtp_amr_depay_chain): Patch from Sebastien Cote, fixes #319884
Diffstat (limited to 'gst/rtp/gstrtpamrdepay.c')
-rw-r--r--gst/rtp/gstrtpamrdepay.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c
index 28ec3e39..aa410aa7 100644
--- a/gst/rtp/gstrtpamrdepay.c
+++ b/gst/rtp/gstrtpamrdepay.c
@@ -366,13 +366,6 @@ gst_rtp_amr_depay_chain (GstPad * pad, GstBuffer * buf)
break;
}
- /* this is impossible */
- if (num_packets == payload_len) {
- GST_ELEMENT_WARNING (rtpamrdepay, STREAM, DECODE,
- (NULL), ("AMR RTP num_packets == payload_len"));
- goto bad_packet;
- }
-
if (rtpamrdepay->crc) {
/* data len + CRC len + header bytes should be smaller than payload_len */
if (num_packets + num_nonempty_packets + amr_len > payload_len) {
@@ -407,10 +400,11 @@ gst_rtp_amr_depay_chain (GstPad * pad, GstBuffer * buf)
for (i = 0; i < num_packets; i++) {
gint fr_size;
+ /* copy FT, clear F bit */
+ *p++ = payload[i] & 0x7f;
+
fr_size = frame_size[(payload[i] & 0x78) >> 3];
if (fr_size > 0) {
- /* copy FT, clear F bit */
- *p++ = payload[i] & 0x7f;
/* copy data packet, FIXME, calc CRC here. */
memcpy (p, dp, fr_size);