summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2019-01-04 11:57:52 -0800
committerU. Artie Eoff <ullysses.a.eoff@intel.com>2019-01-06 19:07:35 -0800
commite91a53f69360290c47d00d999da8869d3622143a (patch)
treec6f55aa29039297263039608ad2fbf04ed9263f2 /sys
parent8249763f6ceec6b9276ce58380b9085fd7e01612 (diff)
downloadgstreamer-plugins-bad-e91a53f69360290c47d00d999da8869d3622143a.tar.gz
msdkenc: break out of flush frames loop on error
In general, we should assume any unhandled error is non-recoverable. In the flush frames loop, some error states can cause us to never increment the task and therefore we get stuck in an infinite loop and generate GST_ELEMENT_ERROR over and over again. This eventually consumes all system memory and triggers OOM. Thus, assume the worst and break out of the loop upon the first "unhandled" error. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/859
Diffstat (limited to 'sys')
-rw-r--r--sys/msdk/gstmsdkenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c
index bc9d4d36e..c3e16ce75 100644
--- a/sys/msdk/gstmsdkenc.c
+++ b/sys/msdk/gstmsdkenc.c
@@ -830,6 +830,7 @@ gst_msdkenc_flush_frames (GstMsdkEnc * thiz, gboolean discard)
if (status != MFX_ERR_NONE && status != MFX_ERR_MORE_DATA) {
GST_ELEMENT_ERROR (thiz, STREAM, ENCODE, ("Encode frame failed."),
("MSDK encode error (%s)", msdk_status_to_string (status)));
+ break;
}
if (task->sync_point) {