diff options
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c')
-rw-r--r-- | chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c b/chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c index e5fa8071b3b..c00e7e4e155 100644 --- a/chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c +++ b/chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c @@ -180,7 +180,7 @@ static av_cold int vdadec_init(AVCodecContext *avctx) VDADecoderContext *ctx = avctx->priv_data; struct vda_context *vda_ctx = &ctx->vda_ctx; OSStatus status; - int ret; + int ret, i; ctx->h264_initialized = 0; @@ -235,6 +235,16 @@ static av_cold int vdadec_init(AVCodecContext *avctx) } ctx->h264_initialized = 1; + for (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: |