On 02/10/15 12:43, Vittorio Giovara wrote:
> Avoid storing uninitialized data, even if not read later.
> ---
>  libavcodec/ffv1enc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
> index 32b3711..31a387c 100644
> --- a/libavcodec/ffv1enc.c
> +++ b/libavcodec/ffv1enc.c
> @@ -318,7 +318,7 @@ static void encode_rgb_frame(FFV1Context *s, const 
> uint8_t *src[3],
>                                 ((h + i - y) % ring_size) * (w + 6) + 3;
>  
>          for (x = 0; x < w; x++) {
> -            int b, g, r, av_uninit(a);
> +            int b, g, r, a = 0xFF;
>              if (lbd) {
>                  unsigned v = *((const uint32_t *)(src[0] + x * 4 + stride[0] 
> * y));
>                  b = v & 0xFF;
> 

Given how av_uninit is implemented, why not?

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to