From 79d9c34205b4dedec74eb916e364009831fb701d Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Tue, 2 Jun 2015 11:31:00 -0300 Subject: [PATCH] zbar: don't ignore zbar_scan_image() errors --- ext/zbar/gstzbar.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/zbar/gstzbar.c b/ext/zbar/gstzbar.c index faf2b55803..2bb0a7d8fe 100644 --- a/ext/zbar/gstzbar.c +++ b/ext/zbar/gstzbar.c @@ -299,6 +299,10 @@ gst_zbar_transform_frame_ip (GstVideoFilter * vfilter, GstVideoFrame * frame) /* scan the image for barcodes */ n = zbar_scan_image (zbar->scanner, image); + if (G_UNLIKELY (n == -1)) { + GST_WARNING_OBJECT (zbar, "Error trying to scan frame. Skipping"); + goto out; + } if (n == 0) goto out;