diff options
author | Pascal Buhler <pascal.buhler@tandberg.com> | 2010-06-11 08:36:33 +0200 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-30 15:49:07 +0000 |
commit | c16fed2ad9da18d3173fbb56cd1dfc8e259d1dbb (patch) | |
tree | ba6b86cced1f53ea98f9aabeefa56bfed4f03532 | |
parent | 70565f0e75591cc1f748cb5bf5d0ac259abba7ec (diff) | |
download | gstreamer-plugins-good-c16fed2ad9da18d3173fbb56cd1dfc8e259d1dbb.tar.gz |
rtph264depay: Exclude NALu size from payload length on truncated packets.
https://bugzilla.gnome.org/show_bug.cgi?id=667846
-rw-r--r-- | gst/rtp/gstrtph264depay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtp/gstrtph264depay.c b/gst/rtp/gstrtph264depay.c index 27b5d4b9f..efe172593 100644 --- a/gst/rtp/gstrtph264depay.c +++ b/gst/rtp/gstrtph264depay.c @@ -735,8 +735,9 @@ gst_rtp_h264_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) */ nalu_size = (payload[0] << 8) | payload[1]; - if (nalu_size > payload_len) - nalu_size = payload_len; + /* dont include nalu_size */ + if (nalu_size > (payload_len - 2)) + nalu_size = payload_len - 2; outsize = nalu_size + sizeof (sync_bytes); outbuf = gst_buffer_new_and_alloc (outsize); |