mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
vrawdepay: fix length check
Add some more debugging. Add the length check so we don't cause unneeded warnings.
This commit is contained in:
parent
43c6d0c72a
commit
6b91c5f6e7
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue