Re: [FFmpeg-devel] [PATCH, v4] lavc/qsvenc: replace assert with error return

2018-12-09 Thread Li, Zhong
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Linjie Fu > Sent: Sunday, December 9, 2018 9:31 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Fu, Linjie > Subject: [FFmpeg-devel] [PATCH, v4] lavc/qsvenc: replace assert with error > return > &g

[FFmpeg-devel] [PATCH, v4] lavc/qsvenc: replace assert with error return

2018-12-09 Thread Linjie Fu
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.