diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2019-01-04 11:57:52 -0800 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-02 11:53:32 +0100 |
commit | 6d35510a3666e6de697412c6334a65583fea4ffc (patch) | |
tree | b141508495c73cd98699fd19bf6535d169953daa | |
parent | 201b8e075db5e97e0f5a40be9eb50688e4a7e948 (diff) | |
download | gstreamer-plugins-bad-6d35510a3666e6de697412c6334a65583fea4ffc.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
-rw-r--r-- | sys/msdk/gstmsdkenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c index 9cbe6fe83..28ccc72db 100644 --- a/sys/msdk/gstmsdkenc.c +++ b/sys/msdk/gstmsdkenc.c @@ -803,6 +803,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) { |