From 96747e6cbe755f448e978987e57096ef1452e340 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 11 Jul 2013 16:08:49 +0200 Subject: [PATCH] mjpegdec: parse app-xfrm Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 7 +++++++ libavcodec/mjpegdec.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index a4a9650276..65d9475d74 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1469,6 +1469,13 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) len --; goto out; } + if (id == AV_RL32("xfrm") && len > 0) { + s->xfrm = get_bits(&s->gb, 8); + if (s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_INFO, "XFRM %d\n", s->xfrm); + len --; + goto out; + } /* Apple MJPEG-A */ if ((s->start_code == APP1) && (len > (0x28 - 8))) { diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 6f82706537..0cb26f1c81 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -66,6 +66,7 @@ typedef struct MJpegDecodeContext { int pegasus_rct; /* pegasus reversible colorspace transform */ int bits; /* bits per component */ int colr; + int xfrm; int maxval; int near; ///< near lossless bound (si 0 for lossless)