# HG changeset patch # User ramiro # Date 1208896250 0 # Node ID 4a5c7112e35c0a71b523df6644996532c5ca2ff9 # Parent 1c76797e22165d235018faedf7354d9f8428f2f5 The code now is pretty self explanatory about the header structure. Remove the big comment and add comments about the skipped fields. diff -r 1c76797e2216 -r 4a5c7112e35c mimic.c --- a/mimic.c Tue Apr 22 20:24:07 2008 +0000 +++ b/mimic.c Tue Apr 22 20:30:50 2008 +0000 @@ -282,27 +282,16 @@ int quality, num_coeffs; int swap_buf_size = buf_size - MIMIC_HEADER_SIZE; - /* - * Header structure: - * uint16_t I_dont_remember; - * uint16_t quality; - * uint16_t width; - * uint16_t height; - * uint32_t some_constant; - * uint32_t is_pframe; - * uint32_t num_coeffs; - */ - if(buf_size < MIMIC_HEADER_SIZE) { av_log(avctx, AV_LOG_ERROR, "insufficient data\n"); return -1; } - buf += 2; + buf += 2; /* some constant (always 256) */ quality = bytestream_get_le16(&buf); width = bytestream_get_le16(&buf); height = bytestream_get_le16(&buf); - buf += 4; + buf += 4; /* some constant */ is_pframe = bytestream_get_le32(&buf); num_coeffs = bytestream_get_le32(&buf);