OSDN Git Service

avcodec/mjpegdec: parse adobe_transform
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 27 Feb 2014 19:02:20 +0000 (20:02 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 27 Feb 2014 19:13:48 +0000 (20:13 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c
libavcodec/mjpegdec.h

index 22a1067..3469f70 100644 (file)
@@ -1515,12 +1515,12 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
     }
 
     if (id == AV_RB32("Adob") && (get_bits(&s->gb, 8) == 'e')) {
-        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
-            av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n");
         skip_bits(&s->gb, 16); /* version */
         skip_bits(&s->gb, 16); /* flags0 */
         skip_bits(&s->gb, 16); /* flags1 */
-        skip_bits(&s->gb,  8); /* transform */
+        s->adobe_transform = get_bits(&s->gb,  8);
+        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
+            av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found, transform=%d\n", s->adobe_transform);
         len -= 7;
         goto out;
     }
index 1317404..77bbfed 100644 (file)
@@ -69,6 +69,7 @@ typedef struct MJpegDecodeContext {
     int bits;           /* bits per component */
     int colr;
     int xfrm;
+    int adobe_transform;
 
     int maxval;
     int near;         ///< near lossless bound (si 0 for lossless)