mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 01:54:17 +00:00
Fixed two off by one bugs in the delta decoding code.
Original commit message from CVS: Fixed two off by one bugs in the delta decoding code.
This commit is contained in:
parent
35e1987b60
commit
836471779e
1 changed files with 4 additions and 3 deletions
|
@ -340,8 +340,6 @@ flx_decode_delta_fli(GstFlxDec *flxdec, guchar *data, guchar *dest)
|
||||||
/* packet count */
|
/* packet count */
|
||||||
packets = *data++;
|
packets = *data++;
|
||||||
|
|
||||||
dest = start_p + (flxdec->hdr.width * (start_l - lines));
|
|
||||||
|
|
||||||
while(packets--) {
|
while(packets--) {
|
||||||
/* skip count */
|
/* skip count */
|
||||||
dest += *data++;
|
dest += *data++;
|
||||||
|
@ -363,6 +361,8 @@ flx_decode_delta_fli(GstFlxDec *flxdec, guchar *data, guchar *dest)
|
||||||
*dest++ = *data++;
|
*dest++ = *data++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
start_p += flxdec->hdr.width;
|
||||||
|
dest = start_p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ flx_decode_delta_flc(GstFlxDec *flxdec, guchar *data, guchar *dest)
|
||||||
start_p = dest;
|
start_p = dest;
|
||||||
start_l = lines;
|
start_l = lines;
|
||||||
|
|
||||||
while(lines--) {
|
while (lines) {
|
||||||
dest = start_p + (flxdec->hdr.width * (start_l - lines));
|
dest = start_p + (flxdec->hdr.width * (start_l - lines));
|
||||||
|
|
||||||
/* process opcode(s) */
|
/* process opcode(s) */
|
||||||
|
@ -428,6 +428,7 @@ flx_decode_delta_flc(GstFlxDec *flxdec, guchar *data, guchar *dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lines--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue