diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-08-21 18:57:30 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-08-21 19:18:05 +0000 |
commit | 925d0837b9f06be66e6aa56ff432154061829781 (patch) | |
tree | ab0c618b12e6b433954195882d6a4f13337f4da9 /libavcodec/qtrle.c | |
parent | 9a5aa2c48e3583b549158afe1429b8f25b77e622 (diff) | |
download | ffmpeg-925d0837b9f06be66e6aa56ff432154061829781.tar.gz |
qtrle: use bytestream2_get_buffer()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/qtrle.c')
-rw-r--r-- | libavcodec/qtrle.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 6bf138f242..6dfe2ced99 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -110,8 +110,8 @@ static void qtrle_decode_1bpp(QtrleContext *s, int row_ptr, int lines_to_change) rle_code *= 2; CHECK_PIXEL_PTR(rle_code); - while (rle_code--) - rgb[pixel_ptr++] = bytestream2_get_byte(&s->g); + bytestream2_get_buffer(&s->g, &rgb[pixel_ptr], rle_code); + pixel_ptr += rle_code; } } } @@ -214,9 +214,8 @@ static void qtrle_decode_8bpp(QtrleContext *s, int row_ptr, int lines_to_change) rle_code *= 4; CHECK_PIXEL_PTR(rle_code); - while (rle_code--) { - rgb[pixel_ptr++] = bytestream2_get_byte(&s->g); - } + bytestream2_get_buffer(&s->g, &rgb[pixel_ptr], rle_code); + pixel_ptr += rle_code; } } row_ptr += row_inc; |