mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
thp: Fix handling of restart interval
Fixes Ticket903 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7a1723086a
commit
1843e6c8aa
@ -1048,6 +1048,12 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
|
|||||||
|
|
||||||
if (s->restart_interval) {
|
if (s->restart_interval) {
|
||||||
s->restart_count--;
|
s->restart_count--;
|
||||||
|
if(s->restart_count == 0 && s->avctx->codec_id == CODEC_ID_THP){
|
||||||
|
align_get_bits(&s->gb);
|
||||||
|
for (i = 0; i < nb_components; i++) /* reset dc */
|
||||||
|
s->last_dc[i] = 1024;
|
||||||
|
}
|
||||||
|
|
||||||
i = 8 + ((-get_bits_count(&s->gb)) & 7);
|
i = 8 + ((-get_bits_count(&s->gb)) & 7);
|
||||||
/* skip RSTn */
|
/* skip RSTn */
|
||||||
if (show_bits(&s->gb, i) == (1 << i) - 1) {
|
if (show_bits(&s->gb, i) == (1 << i) - 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user