diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-05 15:03:32 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-05 15:03:32 +0100 |
commit | 6b91c5f6e765e8522199d6b33b23dfd3d69d06b1 (patch) | |
tree | a5e3eed6015e6378bf3b98b7663a8e4e8be1382d | |
parent | 43c6d0c72afba986a3642e1bda825461c7a971a2 (diff) |
vrawdepay: fix length check
Add some more debugging.
Add the length check so we don't cause unneeded warnings.
-rw-r--r-- | gst/rtp/gstrtpvrawdepay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index 8e1af75e7..5919a5bcb 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -242,6 +242,7 @@ gst_rtp_vraw_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) GST_DEBUG_OBJECT (depayload, "width %d, height %d, format %d", width, height, format); GST_DEBUG_OBJECT (depayload, "yp %d, up %d, vp %d", yp, up, vp); + GST_DEBUG_OBJECT (depayload, "xinc %d, yinc %d", xinc, yinc); GST_DEBUG_OBJECT (depayload, "pgroup %d, ystride %d, uvstride %d", pgroup, ystride, uvstride); GST_DEBUG_OBJECT (depayload, "outsize %u", outsize); @@ -386,10 +387,10 @@ gst_rtp_vraw_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) } /* calculate the maximim amount of bytes we can use per line */ - if (offs + ((length / pgroup) * xinc) > (width - xinc)) { + if (offs + ((length / pgroup) * xinc) > width) { plen = ((width - offs) * pgroup) / xinc; - GST_WARNING_OBJECT (depayload, "clipping length %d, offset %d", length, - offs); + GST_WARNING_OBJECT (depayload, "clipping length %d, offset %d, plen %d", + length, offs, plen); } else plen = length; |