aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-01 19:53:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-01 20:04:54 +0200
commitd41a4a765b702f89d1f757d9c96e25be8fa77016 (patch)
treede581a0e0001467177f42bb0a416f23cf6cc2e3a
parent6d695d7acc4cb1da84eb73710e05a4c090e5ab31 (diff)
downloadffmpeg-d41a4a765b702f89d1f757d9c96e25be8fa77016.tar.gz
avcodec/mjpegenc: allow encoding amv with height % 16 != 0 when strict -1 is set
This should make it simpler for users to test if such videos work Suggested-by: carl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mjpegenc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 7a87f24271..d76e9ba9fb 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -539,11 +539,13 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
if(s->avctx->flags & CODEC_FLAG_EMU_EDGE)
return AVERROR(EINVAL);
- if (avctx->height & 15) {
+ if ((avctx->height & 15) && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
av_log(avctx, AV_LOG_ERROR,
- "Height must be a multiple of 16, also note, "
- "if you have a AMV sample thats mod 16 != 0, please contact us\n");
- return AVERROR(EINVAL);
+ "Heights which are not a multiple of 16 might fail with some decoders, "
+ "use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->height);
+ av_log(avctx, AV_LOG_WARNING, "If you have a device that plays AMV videos, please test if videos "
+ "with such heights work with it and report your findings to ffmpeg-devel@ffmpeg.org\n");
+ return AVERROR_EXPERIMENTAL;
}
pic = av_frame_clone(pic_arg);