diff mbox

[FFmpeg-devel] lavc/h263dec: Remove a variable declaration that can lead to a warning

Message ID CAB0OVGoCG0Kmzn7+gybQqrjAOXwNuvsTiV-O-7v3fDYE6zjD=w@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos July 11, 2018, 10:10 p.m. UTC
Hi!

Attached patch silences a warning about an unused variable for the
default compilation.

Please comment, Carl Eugen

Comments

Michael Niedermayer July 12, 2018, 10:58 p.m. UTC | #1
On Thu, Jul 12, 2018 at 12:10:22AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch silences a warning about an unused variable for the
> default compilation.
> 
> Please comment, Carl Eugen

>  h263dec.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 033e73b13321e415b275c02514fcbce6ffa8623c  0001-lavc-h263dec-Remove-a-variable-declaration-that-can-.patch
> From d9fd7569ef2526f00b5544c3efef377ea86f815c Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> Date: Thu, 12 Jul 2018 00:07:55 +0200
> Subject: [PATCH] lavc/h263dec: Remove a variable declaration that can lead to
>  a warning.

LGTM

thx

[...]
Carl Eugen Hoyos July 12, 2018, 11:01 p.m. UTC | #2
2018-07-13 0:58 GMT+02:00, Michael Niedermayer <michael@niedermayer.cc>:
> On Thu, Jul 12, 2018 at 12:10:22AM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch silences a warning about an unused variable for the
>> default compilation.
>>
>> Please comment, Carl Eugen
>
>>  h263dec.c |    3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>> 033e73b13321e415b275c02514fcbce6ffa8623c
>> 0001-lavc-h263dec-Remove-a-variable-declaration-that-can-.patch
>> From d9fd7569ef2526f00b5544c3efef377ea86f815c Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Thu, 12 Jul 2018 00:07:55 +0200
>> Subject: [PATCH] lavc/h263dec: Remove a variable declaration that can lead
>> to
>>  a warning.
>
> LGTM

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From d9fd7569ef2526f00b5544c3efef377ea86f815c Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Thu, 12 Jul 2018 00:07:55 +0200
Subject: [PATCH] lavc/h263dec: Remove a variable declaration that can lead to
 a warning.

---
 libavcodec/h263dec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 5967fca..2cf01e3 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -47,10 +47,9 @@ 
 
 static enum AVPixelFormat h263_get_format(AVCodecContext *avctx)
 {
-    MpegEncContext *s = avctx->priv_data;
     /* MPEG-4 Studio Profile only, not supported by hardware */
     if (avctx->bits_per_raw_sample > 8) {
-        av_assert1(s->studio_profile);
+        av_assert1(((MpegEncContext *)avctx->priv_data)->studio_profile);
         return avctx->pix_fmt;
     }
 
-- 
1.7.10.4