diff --git a/Changelog b/Changelog index 6442a89148..dfee2e65e8 100644 --- a/Changelog +++ b/Changelog @@ -13,6 +13,7 @@ version : - indeo3: use unaligned reads on reference blocks, Bug #503 - oma: properly forward errors in oma_read_packet - af_asyncts: fix offset calculation +- proresdec: support mixed interlaced/non-interlaced content Most of the following fixes resulted from test samples that the Google Security Team has kindly made available to us: diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index b1aff360d2..a59ba3b046 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1676,6 +1676,13 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, mjpeg_decode_com(s); ret = -1; + + if (!CONFIG_JPEGLS_DECODER && + (start_code == SOF48 || start_code == LSE)) { + av_log(avctx, AV_LOG_ERROR, "JPEG-LS support not enabled.\n"); + return AVERROR(ENOSYS); + } + switch (start_code) { case SOI: s->restart_interval = 0; diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c index 4fa2817e86..a25ecca3c9 100644 --- a/libavcodec/proresdec_lgpl.c +++ b/libavcodec/proresdec_lgpl.c @@ -164,6 +164,8 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, if (ctx->frame_type) { /* if interlaced */ ctx->picture.interlaced_frame = 1; ctx->picture.top_field_first = ctx->frame_type & 1; + } else { + ctx->picture.interlaced_frame = 0; } avctx->color_primaries = buf[14];