[farsight2/master] rtcpfilter: Verify if the packet exists before continuing
Olivier Crête
olivier.crete at collabora.co.uk
Mon Aug 3 08:53:07 PDT 2009
---
gst/rtcpfilter/fs-rtcp-filter.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gst/rtcpfilter/fs-rtcp-filter.c b/gst/rtcpfilter/fs-rtcp-filter.c
index 68e6d62..1f6ed04 100644
--- a/gst/rtcpfilter/fs-rtcp-filter.c
+++ b/gst/rtcpfilter/fs-rtcp-filter.c
@@ -208,8 +208,8 @@ fs_rtcp_filter_transform_ip (GstBaseTransform *transform, GstBuffer *buf)
GstRTCPPacket nextpacket = packet;
modified = TRUE;
- gst_rtcp_packet_move_to_next (&nextpacket);
- if (gst_rtcp_packet_get_type (&nextpacket) == GST_RTCP_TYPE_RR)
+ if (gst_rtcp_packet_move_to_next (&nextpacket) &&
+ gst_rtcp_packet_get_type (&nextpacket) == GST_RTCP_TYPE_RR)
{
if (!gst_rtcp_packet_remove (&packet))
break;
@@ -226,7 +226,8 @@ fs_rtcp_filter_transform_ip (GstBaseTransform *transform, GstBuffer *buf)
memmove (GST_BUFFER_DATA (buf) + packet.offset + 8,
GST_BUFFER_DATA (buf) + nextpacket.offset,
GST_BUFFER_SIZE (buf) - nextpacket.offset);
- gst_rtcp_buffer_get_first_packet (buf, &packet);
+ if (!gst_rtcp_buffer_get_first_packet (buf, &packet))
+ break;
}
}
--
1.5.6.5
More information about the farsight-commits
mailing list