Commit c16fed2a authored by Pascal Buhler's avatar Pascal Buhler Committed by Vincent Penquerc'h
Browse files

rtph264depay: Exclude NALu size from payload length on truncated packets.

https://bugzilla.gnome.org/show_bug.cgi?id=667846
parent 70565f0e
...@@ -735,8 +735,9 @@ gst_rtp_h264_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) ...@@ -735,8 +735,9 @@ gst_rtp_h264_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
*/ */
nalu_size = (payload[0] << 8) | payload[1]; nalu_size = (payload[0] << 8) | payload[1];
if (nalu_size > payload_len) /* dont include nalu_size */
nalu_size = payload_len; if (nalu_size > (payload_len - 2))
nalu_size = payload_len - 2;
outsize = nalu_size + sizeof (sync_bytes); outsize = nalu_size + sizeof (sync_bytes);
outbuf = gst_buffer_new_and_alloc (outsize); outbuf = gst_buffer_new_and_alloc (outsize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment