From 1fa37f2bfa0f5c50ce61dedf2bbb772d96d71101 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 21 Jan 2013 19:40:35 +0100 Subject: [PATCH 1/4] proresdec: support mixed interlaced/non-interlaced content Set interlaced to false if we don't have an interlaced frame Signed-off-by: Luca Barbato (cherry picked from commit 0881cbf314982cce8448bd12644ce2a6e0b8c576) Signed-off-by: Reinhard Tartler --- libavcodec/proresdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index f7e32c998b..4b196f6d32 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.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]; From 82c3792a308469351f0a3df20b539a9b7e6641a3 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 12 May 2013 08:39:07 +0200 Subject: [PATCH 2/4] update Changelog --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 284d4cca57..3ceb469850 100644 --- a/Changelog +++ b/Changelog @@ -13,6 +13,7 @@ version 9.6: - 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 version 9.5: From 2c23237cb4ed963eb5f33d8ef536b3033712e69d Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Fri, 31 May 2013 23:00:19 +0200 Subject: [PATCH 3/4] Prepare for 9.7 Release --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE b/RELEASE index c026ac828d..9d5e716c05 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -9.6 +9.7 From aaeef7fa0d6ebb1a3668894e67a70cd5084ce4f4 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 14 May 2013 15:27:26 +0200 Subject: [PATCH 4/4] mjpegdec: properly report unsupported disabled features When JPEG-LS support is disabled the decoder would feed the data to the JPEG Lossless decode_*_scan function resulting in faulty decoding. CC: libav-stable@libav.org (cherry picked from commit b25e49b187617c486ae3f50a5cbb356fc0e868bb) Signed-off-by: Reinhard Tartler --- libavcodec/mjpegdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 0b22bca5f3..4956e3a8b7 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1489,6 +1489,12 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, else if (start_code == COM) mjpeg_decode_com(s); + 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;