[FFmpeg-devel] [PATCH] WMA: add "const" to avoid warnings with hardcoded tables.

2014-08-30 Thread Reimar Döffinger
Signed-off-by: Reimar Döffinger 
---
 libavcodec/wma.h   | 2 +-
 libavcodec/wmaprodec.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index c4056ec..01244a0 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -115,7 +115,7 @@ typedef struct WMACodecContext {
 DECLARE_ALIGNED(32, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
 DECLARE_ALIGNED(32, FFTSample, output)[BLOCK_MAX_SIZE * 2];
 FFTContext mdct_ctx[BLOCK_NB_SIZES];
-float *windows[BLOCK_NB_SIZES];
+const float *windows[BLOCK_NB_SIZES];
 /* output buffer for one frame and the last for IMDCT windowing */
 DECLARE_ALIGNED(32, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
 /* last frame info */
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 2f6c485..f45e1fc 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -177,7 +177,7 @@ typedef struct WMAProDecodeCtx {
 PutBitContextpb;///< context for filling 
the frame_data buffer
 FFTContext   mdct_ctx[WMAPRO_BLOCK_SIZES];  ///< MDCT context per 
block size
 DECLARE_ALIGNED(32, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output 
buffer
-float*   windows[WMAPRO_BLOCK_SIZES];   ///< windows for the 
different block sizes
+const float* windows[WMAPRO_BLOCK_SIZES];   ///< windows for the 
different block sizes
 
 /* frame size dependent frame information (set during initialization) */
 uint32_t decode_flags;  ///< used compression 
features
@@ -1055,7 +1055,7 @@ static void wmapro_window(WMAProDecodeCtx *s)
 int i;
 for (i = 0; i < s->channels_for_cur_subframe; i++) {
 int c = s->channel_indexes_for_cur_subframe[i];
-float* window;
+const float* window;
 int winlen = s->channel[c].prev_block_len;
 float* start = s->channel[c].coeffs - (winlen >> 1);
 
-- 
2.1.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] WMA: add "const" to avoid warnings with hardcoded tables.

2014-08-30 Thread Michael Niedermayer
On Sat, Aug 30, 2014 at 06:00:20PM +0200, Reimar Döffinger wrote:
> Signed-off-by: Reimar Döffinger 
> ---
>  libavcodec/wma.h   | 2 +-
>  libavcodec/wmaprodec.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

LGTM

thanks

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] WMA: add "const" to avoid warnings with hardcoded tables.

2014-08-31 Thread Reimar Döffinger
On Sat, Aug 30, 2014 at 06:14:59PM +0200, Michael Niedermayer wrote:
> On Sat, Aug 30, 2014 at 06:00:20PM +0200, Reimar Döffinger wrote:
> > Signed-off-by: Reimar Döffinger 
> > ---
> >  libavcodec/wma.h   | 2 +-
> >  libavcodec/wmaprodec.c | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> LGTM
> 
> thanks

Pushed, thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel