Commit ec1ed645 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/cljr: require (v)strict -1 to use width %4 != 0

Suggested-by: kurosu
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 754bf121
......@@ -115,6 +115,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{ 0xCB2A0000, 0xCB250000 },
};
if (avctx->width%4 && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
av_log(avctx, AV_LOG_ERROR,
"Widths which are not a multiple of 4 might fail with some decoders, "
"use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->width);
return AVERROR_EXPERIMENTAL;
}
if ((ret = ff_alloc_packet2(avctx, pkt, 32*avctx->height*avctx->width/4)) < 0)
return ret;
......
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