Merge commit 'b53d8c3ccfeff77874f5ca7c68136b6d87a0a69c'

* commit 'b53d8c3ccfeff77874f5ca7c68136b6d87a0a69c':
  mjpegdec: Drop disabled code

The last chunk is replaced with a comment describing the structure.

Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
Clément Bœsch 2017-03-19 16:03:25 +01:00
commit 1a48a51bfc
1 changed files with 10 additions and 18 deletions

View File

@ -1665,17 +1665,9 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
s->buggy_avid = 1; s->buggy_avid = 1;
i = get_bits(&s->gb, 8); len--; i = get_bits(&s->gb, 8); len--;
av_log(s->avctx, AV_LOG_DEBUG, "polarity %d\n", i); av_log(s->avctx, AV_LOG_DEBUG, "polarity %d\n", i);
#if 0
skip_bits(&s->gb, 8);
skip_bits(&s->gb, 32);
skip_bits(&s->gb, 32);
len -= 10;
#endif
goto out; goto out;
} }
// len -= 2;
if (id == AV_RB32("JFIF")) { if (id == AV_RB32("JFIF")) {
int t_w, t_h, v1, v2; int t_w, t_h, v1, v2;
if (len < 8) if (len < 8)
@ -1859,16 +1851,16 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
len -= 4; len -= 4;
/* Apple MJPEG-A */ /* Apple MJPEG-A */
if (id == AV_RB32("mjpg")) { if (id == AV_RB32("mjpg")) {
#if 0 /* structure:
skip_bits(&s->gb, 32); /* field size */ 4bytes field size
skip_bits(&s->gb, 32); /* pad field size */ 4bytes pad field size
skip_bits(&s->gb, 32); /* next off */ 4bytes next off
skip_bits(&s->gb, 32); /* quant off */ 4bytes quant off
skip_bits(&s->gb, 32); /* huff off */ 4bytes huff off
skip_bits(&s->gb, 32); /* image off */ 4bytes image off
skip_bits(&s->gb, 32); /* scan off */ 4bytes scan off
skip_bits(&s->gb, 32); /* data off */ 4bytes data off
#endif */
if (s->avctx->debug & FF_DEBUG_PICT_INFO) if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_INFO, "mjpeg: Apple MJPEG-A header found\n"); av_log(s->avctx, AV_LOG_INFO, "mjpeg: Apple MJPEG-A header found\n");
} }