gst-plugins-good: rtph264depay: Exclude NALu size from payload length on truncated packets.

Vincent Penquerc'h vincent at kemper.freedesktop.org
Mon Jan 30 07:50:19 PST 2012


Module: gst-plugins-good
Branch: master
Commit: c16fed2ad9da18d3173fbb56cd1dfc8e259d1dbb
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=c16fed2ad9da18d3173fbb56cd1dfc8e259d1dbb

Author: Pascal Buhler <pascal.buhler at tandberg.com>
Date:   Fri Jun 11 08:36:33 2010 +0200

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

https://bugzilla.gnome.org/show_bug.cgi?id=667846

---

 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 27b5d4b..efe1725 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);



More information about the gstreamer-commits mailing list