vc1dec: Use the right pointer type for the tmp pointer

Message ID 1324371250-48694-1-git-send-email-martin@martin.st
State Committed
Commit b797f7352055cec199bb087323f20edaa1101369
Headers show

Commit Message

Martin Storsjö Dec. 20, 2011, 8:54 a.m.
This fixes warnings about assignment from incompatible
pointer type.
---
 libavcodec/vc1dec.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Kostya Shishkov Dec. 20, 2011, 9:02 a.m. | #1
On 20 December 2011 09:54, Martin Storsjö <martin@martin.st> wrote:
> This fixes warnings about assignment from incompatible
> pointer type.
> ---
>  libavcodec/vc1dec.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index 701a3da..3cb7661 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -5426,13 +5426,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
>     AVFrame *pict = data;
>     uint8_t *buf2 = NULL;
>     const uint8_t *buf_start = buf;
> -    uint8_t *tmp;
>     int mb_height, n_slices1;
>     struct {
>         uint8_t *buf;
>         GetBitContext gb;
>         int mby_start;
> -    } *slices = NULL;
> +    } *slices = NULL, *tmp;
>
>     /* no supplementary picture */
>     if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) {
> --

LGTM

Patch

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 701a3da..3cb7661 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5426,13 +5426,12 @@  static int vc1_decode_frame(AVCodecContext *avctx, void *data,
     AVFrame *pict = data;
     uint8_t *buf2 = NULL;
     const uint8_t *buf_start = buf;
-    uint8_t *tmp;
     int mb_height, n_slices1;
     struct {
         uint8_t *buf;
         GetBitContext gb;
         int mby_start;
-    } *slices = NULL;
+    } *slices = NULL, *tmp;
 
     /* no supplementary picture */
     if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) {