diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2002-01-18 19:41:04 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2002-01-18 19:41:04 +0000 |
commit | 836471779ec2337a52c33b4a4858d573b255199c (patch) | |
tree | 4b1558121537c5f72de58942f0f5be75f49da866 /gst/flx/gstflxdec.c | |
parent | 35e1987b602486028573eb697d68e5ce3c3f46bc (diff) | |
download | gst-plugins-bad-836471779ec2337a52c33b4a4858d573b255199c.tar.gz gst-plugins-bad-836471779ec2337a52c33b4a4858d573b255199c.tar.bz2 gst-plugins-bad-836471779ec2337a52c33b4a4858d573b255199c.zip |
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.
Diffstat (limited to 'gst/flx/gstflxdec.c')
-rw-r--r-- | gst/flx/gstflxdec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index b679fa48..bfa72788 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -340,8 +340,6 @@ flx_decode_delta_fli(GstFlxDec *flxdec, guchar *data, guchar *dest) /* packet count */ packets = *data++; - dest = start_p + (flxdec->hdr.width * (start_l - lines)); - while(packets--) { /* skip count */ dest += *data++; @@ -363,6 +361,8 @@ flx_decode_delta_fli(GstFlxDec *flxdec, guchar *data, guchar *dest) *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_l = lines; - while(lines--) { + while (lines) { dest = start_p + (flxdec->hdr.width * (start_l - lines)); /* process opcode(s) */ @@ -428,6 +428,7 @@ flx_decode_delta_flc(GstFlxDec *flxdec, guchar *data, guchar *dest) } } } + lines--; } } |