msdkenc: break out of flush frames loop on error
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 4 Jan 2019 19:57:52 +0000 (11:57 -0800)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Mon, 7 Jan 2019 03:07:35 +0000 (19:07 -0800)
commite91a53f69360290c47d00d999da8869d3622143a
treec6f55aa29039297263039608ad2fbf04ed9263f2
parent8249763f6ceec6b9276ce58380b9085fd7e01612
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
sys/msdk/gstmsdkenc.c