[07/12] libopencore-amr: Make the bitrate/mode mapping array static const

Message ID 1302645498-12642-7-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö April 12, 2011, 9:58 p.m.
---
 libavcodec/libopencore-amr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Ronald Bultje April 12, 2011, 11:39 p.m. | #1
Hi,

On Tue, Apr 12, 2011 at 5:58 PM, Martin Storsjö <martin@martin.st> wrote:
> ---
>  libavcodec/libopencore-amr.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
> index 8a8c18b..c04cf99 100644
> --- a/libavcodec/libopencore-amr.c
> +++ b/libavcodec/libopencore-amr.c
> @@ -53,7 +53,7 @@ typedef struct AMR_bitrates {
>  static int getBitrateMode(int bitrate)
>  {
>     /* make the correspondance between bitrate and mode */
> -    AMR_bitrates rates[] = { { 4750, MR475},
> +    static const AMR_bitrates rates[] = {{ 4750, MR475},

OK.

Ronald

Patch

diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 8a8c18b..c04cf99 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -53,7 +53,7 @@  typedef struct AMR_bitrates {
 static int getBitrateMode(int bitrate)
 {
     /* make the correspondance between bitrate and mode */
-    AMR_bitrates rates[] = { { 4750, MR475},
+    static const AMR_bitrates rates[] = {{ 4750, MR475},
                              { 5150, MR515},
                              { 5900, MR59},
                              { 6700, MR67},