Re: [FFmpeg-devel] [PATCH v3] vaapi_encode_mjpeg: fix bad component id bug

2019-06-07 Thread Eoff, Ullysses A
> -Original Message- > From: Eoff, Ullysses A > Sent: Friday, June 07, 2019 2:42 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Eoff, Ullysses A > Subject: [PATCH v3] vaapi_encode_mjpeg: fix bad component id bug > > The compound literals assigned to "components" > only exist within the scope of t

[FFmpeg-devel] [PATCH v3] vaapi_encode_mjpeg: fix bad component id bug

2019-06-07 Thread U. Artie Eoff
The compound literals assigned to "components" only exist within the scope of the if/else block (thanks Mike Thompson for the better explanation). Thus, after this if/else block, "components" ends up pointing to an arbitrary/undefined array. With some compilers and depending on optimization setti