You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/proresenc_anatoliy: Mark impossible case as unreachable
Alternative fix for fix Coverity issue 1440385 (instead of
6106177ad6
).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -27,6 +27,7 @@
|
|||||||
* Known FOURCCs: 'ap4h' (444), 'apch' (HQ), 'apcn' (422), 'apcs' (LT), 'acpo' (Proxy)
|
* Known FOURCCs: 'ap4h' (444), 'apch' (HQ), 'apcn' (422), 'apcs' (LT), 'acpo' (Proxy)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/mem.h"
|
#include "libavutil/mem.h"
|
||||||
#include "libavutil/mem_internal.h"
|
#include "libavutil/mem_internal.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
@ -845,20 +846,25 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->profile == AV_PROFILE_UNKNOWN) {
|
if (avctx->profile == AV_PROFILE_UNKNOWN) {
|
||||||
if (avctx->pix_fmt == AV_PIX_FMT_YUV422P10) {
|
switch (avctx->pix_fmt) {
|
||||||
|
case AV_PIX_FMT_YUV422P10:
|
||||||
avctx->profile = AV_PROFILE_PRORES_STANDARD;
|
avctx->profile = AV_PROFILE_PRORES_STANDARD;
|
||||||
av_log(avctx, AV_LOG_INFO,
|
av_log(avctx, AV_LOG_INFO,
|
||||||
"encoding with ProRes standard (apcn) profile\n");
|
"encoding with ProRes standard (apcn) profile\n");
|
||||||
} else if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10) {
|
break;
|
||||||
|
case AV_PIX_FMT_YUV444P10:
|
||||||
avctx->profile = AV_PROFILE_PRORES_4444;
|
avctx->profile = AV_PROFILE_PRORES_4444;
|
||||||
av_log(avctx, AV_LOG_INFO,
|
av_log(avctx, AV_LOG_INFO,
|
||||||
"encoding with ProRes 4444 (ap4h) profile\n");
|
"encoding with ProRes 4444 (ap4h) profile\n");
|
||||||
} else if (avctx->pix_fmt == AV_PIX_FMT_YUVA444P10) {
|
break;
|
||||||
|
case AV_PIX_FMT_YUVA444P10:
|
||||||
avctx->profile = AV_PROFILE_PRORES_4444;
|
avctx->profile = AV_PROFILE_PRORES_4444;
|
||||||
av_log(avctx, AV_LOG_INFO,
|
av_log(avctx, AV_LOG_INFO,
|
||||||
"encoding with ProRes 4444+ (ap4h) profile\n");
|
"encoding with ProRes 4444+ (ap4h) profile\n");
|
||||||
} else
|
break;
|
||||||
av_assert0(0);
|
default:
|
||||||
|
av_unreachable("Already checked via CODEC_PIXFMTS");
|
||||||
|
}
|
||||||
} else if (avctx->profile < AV_PROFILE_PRORES_PROXY
|
} else if (avctx->profile < AV_PROFILE_PRORES_PROXY
|
||||||
|| avctx->profile > AV_PROFILE_PRORES_XQ) {
|
|| avctx->profile > AV_PROFILE_PRORES_XQ) {
|
||||||
av_log(
|
av_log(
|
||||||
|
Reference in New Issue
Block a user