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.

gstreamer/gst-plugins-bad#859
6 jobs for 859-oom in 32 minutes and 4 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Preparation
passed #74409
gst indent

00:00:40

passed #74408
manifest

00:00:37

 
  Build
passed #74410
build fedora x86_64

00:07:05

 
  Test
passed #74411
check fedora

00:14:51

 
  Full Builds
passed #74412
build android arm64 api28

00:05:26

passed #74413
build cerbero fedora x86_64

00:09:26