[FFmpeg-devel] [PATCH] msrledec: use bytestream2_get_bufferu()

Michael Niedermayer michaelni at gmx.at
Mon Aug 26 18:25:48 CEST 2013


On Mon, Aug 26, 2013 at 03:37:53PM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/msrledec.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
> index 83d7d13..06777d7 100644
> --- a/libavcodec/msrledec.c
> +++ b/libavcodec/msrledec.c
> @@ -184,9 +184,9 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
>              }
>  
>              if ((depth == 8) || (depth == 24)) {
> -                for(i = 0; i < p2 * (depth >> 3); i++) {
> -                    *output++ = bytestream2_get_byteu(gb);
> -                }
> +                bytestream2_get_bufferu(gb, output, p2 * (depth >> 3));
> +                output += p2 * (depth >> 3);
> +

LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130826/77a48a66/attachment.asc>


More information about the ffmpeg-devel mailing list