1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
* 'master' of https://github.com/upsuper/ffmpeg-vdadec:
  avcodec/vda_h264_dec: add format check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-29 03:00:38 +01:00
commit 3477874abd

View File

@ -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: