diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-23 14:23:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-23 14:33:33 +0200 |
commit | 104f42e69485557a7d603047e1d29c44bbd12562 (patch) | |
tree | f70179c1693b6fe212ac4090f49ea1ed843f92d4 /libavcodec/mjpegdec.c | |
parent | c2271fa7f9a88afb374300c7320b57b870969926 (diff) | |
parent | 7b44061f4be1075eefbc2eec649f38dd0dbfcc82 (diff) | |
download | ffmpeg-104f42e69485557a7d603047e1d29c44bbd12562.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
doc/APIchanges: add an entry for codec descriptors.
vorbisenc: set AVCodecContext.bit_rate to 0
vorbisenc: fix quality parameter
FATE: add ALAC encoding tests
lpc: fix alignment of windowed samples for odd maximum LPC order
alacenc: use s16p sample format as input
alacenc: remove unneeded sample_fmt check
alacenc: fix max_frame_size calculation for the final frame
adpcm_swf: Use correct sample offsets when using trellis.
rtmp: support strict rtmp servers
mjpegdec: support AVRn interlaced
x86: remove FASTDIV inline asm
Conflicts:
doc/APIchanges
libavcodec/mjpegdec.c
libavcodec/vorbisenc.c
libavutil/x86/intmath.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 5fbda48d96..29d47b6fef 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1235,6 +1235,7 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, /* mjpeg-b can have padding bytes between sos and image data, skip them */ for (i = s->mjpb_skiptosod; i > 0; i--) skip_bits(&s->gb, 8); + next_field: for (i = 0; i < nb_components; i++) s->last_dc[i] = 1024; @@ -1271,11 +1272,14 @@ next_field: return ret; } } - if(s->interlaced && get_bits_left(&s->gb) > 32 && show_bits(&s->gb, 8) == 0xFF) { - GetBitContext bak= s->gb; + + if (s->interlaced && + get_bits_left(&s->gb) > 32 && + show_bits(&s->gb, 8) == 0xFF) { + GetBitContext bak = s->gb; align_get_bits(&bak); - if(show_bits(&bak, 16) == 0xFFD1) { - av_log(s->avctx, AV_LOG_DEBUG, "AVRn ingterlaced picture\n"); + if (show_bits(&bak, 16) == 0xFFD1) { + av_log(s->avctx, AV_LOG_DEBUG, "AVRn interlaced picture marker found\n"); s->gb = bak; skip_bits(&s->gb, 16); s->bottom_field ^= 1; |