From de488ab3a8aca2ba5457eb50e25fc4ef4a33eb4d Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Thu, 31 May 2018 11:13:05 -0400 Subject: [PATCH] niimaqdxsrc: on timeout return GST_FLOW_ERROR --- sys/niimaqdx/gstniimaqdx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/niimaqdx/gstniimaqdx.c b/sys/niimaqdx/gstniimaqdx.c index 8aa0dd6..614bfb4 100644 --- a/sys/niimaqdx/gstniimaqdx.c +++ b/sys/niimaqdx/gstniimaqdx.c @@ -649,7 +649,6 @@ static GstFlowReturn gst_niimaqdxsrc_fill (GstPushSrc * psrc, GstBuffer * buf) { GstNiImaqDxSrc *src = GST_NIIMAQDXSRC (psrc); - GstFlowReturn ret = GST_FLOW_OK; GstClockTime timestamp = GST_CLOCK_TIME_NONE; GstClockTime duration; uInt32 copied_number; @@ -700,7 +699,7 @@ gst_niimaqdxsrc_fill (GstPushSrc * psrc, GstBuffer * buf) gst_niimaqdxsrc_report_imaq_error (rval); GST_ELEMENT_ERROR (src, RESOURCE, FAILED, ("failed to copy buffer %d", src->cumbufnum), (NULL)); - goto error; + return GST_FLOW_ERROR; } if (src->is_jpeg) { @@ -787,12 +786,7 @@ gst_niimaqdxsrc_fill (GstPushSrc * psrc, GstBuffer * buf) /* set cumulative buffer number to get next frame */ src->cumbufnum = copied_number + 1; - return ret; - -error: - { - return ret; - } + return GST_FLOW_OK; } void