Cover all values in switch(enum_type)

This commit is contained in:
FeRD (Frank Dana)
2019-12-15 07:14:01 -05:00
parent 99565bb342
commit bd4d2bfdc4
3 changed files with 49 additions and 32 deletions

View File

@@ -191,10 +191,10 @@ static enum AVPixelFormat get_hw_dec_format(AVCodecContext *ctx, const enum AVPi
#if defined(__APPLE__)
// Apple pix formats
case AV_PIX_FMT_VIDEOTOOLBOX:
hw_de_av_pix_fmt_global = AV_PIX_FMT_VIDEOTOOLBOX;
hw_de_av_device_type_global = AV_HWDEVICE_TYPE_VIDEOTOOLBOX;
return *p;
break;
hw_de_av_pix_fmt_global = AV_PIX_FMT_VIDEOTOOLBOX;
hw_de_av_device_type_global = AV_HWDEVICE_TYPE_VIDEOTOOLBOX;
return *p;
break;
#endif
// Cross-platform pix formats
case AV_PIX_FMT_CUDA:
@@ -207,6 +207,9 @@ static enum AVPixelFormat get_hw_dec_format(AVCodecContext *ctx, const enum AVPi
hw_de_av_device_type_global = AV_HWDEVICE_TYPE_QSV;
return *p;
break;
default:
// This is only here to silence unused-enum warnings
break;
}
}
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::get_hw_dec_format (Unable to decode this file using hardware decode)");