Commit 3477874a authored by Michael Niedermayer's avatar Michael Niedermayer

Merge branch 'master' of https://github.com/upsuper/ffmpeg-vdadec

* 'master' of https://github.com/upsuper/ffmpeg-vdadec:
  avcodec/vda_h264_dec: add format check
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 54bb30ba 344d6db9
......@@ -235,6 +235,16 @@ static av_cold int vdadec_init(AVCodecContext *avctx)
}
ctx->h264_initialized = 1;
for (int i = 0; i < MAX_SPS_COUNT; i++) {
SPS *sps = ctx->h264ctx.sps_buffers[i];
if (sps && (sps->bit_depth_luma != 8 ||
sps->chroma_format_idc == 2 ||
sps->chroma_format_idc == 3)) {
av_log(avctx, AV_LOG_ERROR, "Format is not supported.\n");
goto failed;
}
}
return 0;
failed:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment