From: Vineeth TM Date: Thu, 4 Jun 2015 23:53:30 +0000 (+0900) Subject: simplevideomark: Add Error logs X-Git-Tag: 1.19.3~507^2~8603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abed8af00c4aa7f7367b5b3b2b093329b75c8693;p=platform%2Fupstream%2Fgstreamer.git simplevideomark: Add Error logs When the pattern offset is outside the video, the print error message https://bugzilla.gnome.org/show_bug.cgi?id=743908 --- diff --git a/gst/videosignal/gstsimplevideomark.c b/gst/videosignal/gstsimplevideomark.c index a0fb1fe..9d57b52 100644 --- a/gst/videosignal/gstsimplevideomark.c +++ b/gst/videosignal/gstsimplevideomark.c @@ -371,8 +371,11 @@ gst_video_mark_yuv (GstSimpleVideoMark * simplevideomark, GstVideoFrame * frame) simplevideomark->pattern_count + simplevideomark->pattern_data_count; /* If x and y offset values are outside the video, no need to draw */ if ((x + (pw * total_pattern)) < 0 || x > width || (y + height) < 0 - || y > height) + || y > height) { + GST_ERROR_OBJECT (simplevideomark, + "simplevideomark pattern is outside the video. Not drawing."); return GST_FLOW_OK; + } /* Offset calculation less than 0, then reset to 0 */ if (offset_calc < 0)