mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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
This commit is contained in:
parent
ec226e856d
commit
abed8af00c
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue