bs->FrameType is not set in MSDK in some cases (mjpeg encode for example),
and assert on a value coming from an external library is not proper.
Add default type check for bs->FrameType, and return invalid data error in
function
ff_qsv_encode to avoid using uninitialized value.
Fix #7593.
Signed
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Linjie Fu
> Sent: Thursday, December 6, 2018 7:19 PM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Fu, Linjie
> Subject: [FFmpeg-devel] [PATCH, v2] lavc/qsvenc: replace assert with error
> return
>
>
> -Original Message-
> From: Li, Zhong
> Sent: Thursday, December 6, 2018 20:30
> To: FFmpeg development discussions and patches de...@ffmpeg.org>
> Cc: Fu, Linjie
> Subject: RE: [FFmpeg-devel] [PATCH, v2] lavc/qsvenc: replace assert with
> error return
&
> > > Subject: [FFmpeg-devel] [PATCH, v2] lavc/qsvenc: replace assert with
> > > error return
> > >
> > > bs->FrameType is not set in MSDK in some cases (mjpeg encode for
> > > bs->example),
> > > and assert on a value coming from an