diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-08-07 19:46:28 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-08-07 19:46:28 +0000 |
commit | 4b4e6ae115219bac7488463bfd74f2ca3faf031d (patch) | |
tree | 41ac133c9e1eb9b686ffe3d08c34fbeb15b04a18 /src/libffmpeg/libavcodec/mjpeg.c | |
parent | a56d88fc434e5ee124867b1af13d6398ce5e9a5a (diff) | |
download | xine-lib-4b4e6ae115219bac7488463bfd74f2ca3faf031d.tar.gz xine-lib-4b4e6ae115219bac7488463bfd74f2ca3faf031d.tar.bz2 |
- sync with ffmpeg cvs
- apply Zdenek Kabelac patches to enable -fpic compiling (why this stuff isn't in
ffmpeg cvs?)
CVS patchset: 2402
CVS date: 2002/08/07 19:46:28
Diffstat (limited to 'src/libffmpeg/libavcodec/mjpeg.c')
-rw-r--r-- | src/libffmpeg/libavcodec/mjpeg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/mjpeg.c b/src/libffmpeg/libavcodec/mjpeg.c index 5beb47e17..c4ebee634 100644 --- a/src/libffmpeg/libavcodec/mjpeg.c +++ b/src/libffmpeg/libavcodec/mjpeg.c @@ -1004,6 +1004,12 @@ static int mjpeg_decode_sos(MJpegDecodeContext *s, } } } + if (s->restart_interval && !--s->restart_count) { + align_get_bits(&s->gb); + skip_bits(&s->gb, 16); /* skip RSTn */ + for (j=0; j<nb_components; j++) /* reset dc */ + s->last_dc[j] = 1024; + } } } ret = 0; @@ -1156,12 +1162,15 @@ static int find_marker(UINT8 **pbuf_ptr, UINT8 *buf_end, state = *header_state; buf_ptr = *pbuf_ptr; +retry: if (state) { /* get marker */ found: if (buf_ptr < buf_end) { val = *buf_ptr++; state = 0; + if ((val >= RST0) && (val <= RST7)) + goto retry; } else { val = -1; } |