summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-01 12:28:56 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-01 12:43:47 +0200
commitec1ed6450620f01197920f1083b285e5c8355377 (patch)
treec2a34067b0f681d9f61b4c60cb0e8e65855a8f27 /libavcodec
parent754bf1212c5a256737a04a8f0d3bb83d1b615d8c (diff)
avcodec/cljr: require (v)strict -1 to use width %4 != 0
Suggested-by: kurosu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cljr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 8d1d1a0c72..d835870aeb 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -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;