diff mbox

[FFmpeg-devel] lavc/avcodec: Constify AVBitStreamFilter* in AVBitStreamFilterContext struct.

Message ID 201703162238.24314.cehoyos@ag.or.at
State Accepted
Commit 9e6b269fea260a4f4cd15d1c0f77b21addee342a
Headers show

Commit Message

Carl Eugen Hoyos March 16, 2017, 9:38 p.m. UTC
Hi!

Attached patch fixes one of two remaining warnings when compiling 
bitstream_filter.c.

Please comment, Carl Eugen
From 7fb60d42ee2137d1181ad0f6e214df87ed06400e Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Thu, 16 Mar 2017 22:31:44 +0100
Subject: [PATCH] lavc/avcodec: Constify AVBitStreamFilter* in
 AVBitStreamFilterContext struct.

Fixes a gcc warning:
libavcodec/bitstream_filter.c:71:20: warning: assignment discards 'const' qualifier from pointer target type
---
 libavcodec/avcodec.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 17, 2017, 1:32 a.m. UTC | #1
On Thu, Mar 16, 2017 at 10:38:24PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes one of two remaining warnings when compiling 
> bitstream_filter.c.
> 
> Please comment, Carl Eugen

>  avcodec.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> cf539519c5fa10e4af07d38e7a5d3ed10a3014a7  0001-lavc-avcodec-Constify-AVBitStreamFilter-in-AVBitStre.patch
> From 7fb60d42ee2137d1181ad0f6e214df87ed06400e Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
> Date: Thu, 16 Mar 2017 22:31:44 +0100
> Subject: [PATCH] lavc/avcodec: Constify AVBitStreamFilter* in
>  AVBitStreamFilterContext struct.
> 
> Fixes a gcc warning:
> libavcodec/bitstream_filter.c:71:20: warning: assignment discards 'const' qualifier from pointer target type

LGTM

thx

[...]
Carl Eugen Hoyos March 18, 2017, 3:43 p.m. UTC | #2
2017-03-17 2:32 GMT+01:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Thu, Mar 16, 2017 at 10:38:24PM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes one of two remaining warnings when compiling
>> bitstream_filter.c.
>>
>> Please comment, Carl Eugen
>
>>  avcodec.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> cf539519c5fa10e4af07d38e7a5d3ed10a3014a7  0001-lavc-avcodec-Constify-AVBitStreamFilter-in-AVBitStre.patch
>> From 7fb60d42ee2137d1181ad0f6e214df87ed06400e Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
>> Date: Thu, 16 Mar 2017 22:31:44 +0100
>> Subject: [PATCH] lavc/avcodec: Constify AVBitStreamFilter* in
>>  AVBitStreamFilterContext struct.
>>
>> Fixes a gcc warning:
>> libavcodec/bitstream_filter.c:71:20: warning: assignment discards 'const' qualifier from pointer target type
>
> LGTM

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1923c96..8774718 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -5764,7 +5764,7 @@  int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
 #if FF_API_OLD_BSF
 typedef struct AVBitStreamFilterContext {
     void *priv_data;
-    struct AVBitStreamFilter *filter;
+    const struct AVBitStreamFilter *filter;
     AVCodecParserContext *parser;
     struct AVBitStreamFilterContext *next;
     /**