Suppress the complain "variables 'type' is used but maybe uninitialized".
Unified · Split
| @@ -31,6 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | #include "libavutil/hwcontext.h" |
| 32 | 32 | #include "libavutil/hwcontext_qsv.h" |
| 33 | 33 | #include "libavutil/imgutils.h" |
| 34 | +#include "libavutil/avassert.h" | |
| 34 | 35 | |
| 35 | 36 | #include "avcodec.h" |
| 36 | 37 | #include "qsv_internal.h" |
| @@ -197,7 +198,7 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame) · 160 unmodified lines | ||
| 197 | 198 | |
| 198 | 199 | enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) |
| 199 | 200 | { |
| 200 | − enum AVPictureType type; | |
| 201 | + enum AVPictureType type = AV_PICTURE_TYPE_NONE; | |
| 201 | 202 | switch (mfx_pic_type & 0x7) { |
| 202 | 203 | case MFX_FRAMETYPE_I: |
| 203 | 204 | if (mfx_pic_type & MFX_FRAMETYPE_S) |
| @@ -214,6 +215,8 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) · 10 unmodified lines | ||
| 214 | 215 | else |
| 215 | 216 | type = AV_PICTURE_TYPE_P; |
| 216 | 217 | break; |
| 218 | + default: | |
| 219 | + av_assert0(0); | |
| 217 | 220 | } |
| 218 | 221 | |
| 219 | 222 | return type; |