History

jpegdec: actually search for and parse RSTn

Fixes Ticket267

Michael Niedermayer committed 15 years ago

Commit 7b8ed831 parent c8d0d8b1 file · +5 −2Browse files

Unified · Split

libavcodec/mjpegdec.c+5−2
@@ -881,9 +881,12 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, i · 880 unmodified lines
881 }881 }
882 }882 }
883 883
884 if (s->restart_interval && !--s->restart_count) {884 if (s->restart_interval && show_bits(&s->gb, 8) == 0xFF){/* skip RSTn */
885 --s->restart_count;
885 align_get_bits(&s->gb);886 align_get_bits(&s->gb);
886 skip_bits(&s->gb, 16); /* skip RSTn */887 while(show_bits(&s->gb, 8) == 0xFF)
888 skip_bits(&s->gb, 8);
889 skip_bits(&s->gb, 8);
887 for (i=0; i<nb_components; i++) /* reset dc */890 for (i=0; i<nb_components; i++) /* reset dc */
888 s->last_dc[i] = 1024;891 s->last_dc[i] = 1024;
889 }892 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t