diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-11 16:07:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-11 16:08:36 +0200 |
commit | 7afa68d37df9c17c5ead6eb3e35348624c717e51 (patch) | |
tree | 224efaffee8ca3999b184a8fbda82ddded638df3 | |
parent | 531f0169444cd6358334daf09417045f8e6ff956 (diff) | |
download | android_external_ffmpeg-7afa68d37df9c17c5ead6eb3e35348624c717e51.tar.gz android_external_ffmpeg-7afa68d37df9c17c5ead6eb3e35348624c717e51.tar.bz2 android_external_ffmpeg-7afa68d37df9c17c5ead6eb3e35348624c717e51.zip |
mjpegdec: parse app-colr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mjpegdec.c | 7 | ||||
-rw-r--r-- | libavcodec/mjpegdec.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 6a362aff0d..a4a9650276 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1462,6 +1462,13 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) len -= 9; goto out; } + if (id == AV_RL32("colr") && len > 0) { + s->colr = get_bits(&s->gb, 8); + if (s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_INFO, "COLR %d\n", s->colr); + 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 31b1fc1e48..6f82706537 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -65,6 +65,7 @@ typedef struct MJpegDecodeContext { int rct; /* standard rct */ int pegasus_rct; /* pegasus reversible colorspace transform */ int bits; /* bits per component */ + int colr; int maxval; int near; ///< near lossless bound (si 0 for lossless) |