diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-16 04:38:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-16 04:38:10 +0200 |
commit | 7970959a94127f85a96218e95ddbd64c38c2a3ab (patch) | |
tree | 5a976320ae61264080f85cb67c6956e3a5b66d42 /libavcodec/opusdec.c | |
parent | 1fb46858c2498c67ae2d6775f7da29732e88fb8a (diff) | |
download | ffmpeg-7970959a94127f85a96218e95ddbd64c38c2a3ab.tar.gz |
avcodec/opusdec: fix some const correctness
also make a const array static
Fixes 2 warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r-- | libavcodec/opusdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c index 1a994c4643..12c342c03c 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -155,8 +155,8 @@ static int opus_flush_resample(OpusStreamContext *s, int nb_samples) static int opus_init_resample(OpusStreamContext *s) { - float delay[16] = { 0.0 }; - uint8_t *delayptr[2] = { (uint8_t*)delay, (uint8_t*)delay }; + static const float delay[16] = { 0.0 }; + const uint8_t *delayptr[2] = { (uint8_t*)delay, (uint8_t*)delay }; int ret; av_opt_set_int(s->swr, "in_sample_rate", s->silk_samplerate, 0); @@ -235,7 +235,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size } samples = swr_convert(s->swr, (uint8_t**)s->out, s->packet.frame_duration, - (uint8_t**)s->silk_output, samples); + (const uint8_t**)s->silk_output, samples); if (samples < 0) { av_log(s->avctx, AV_LOG_ERROR, "Error resampling SILK data.\n"); return samples; |