[FFmpeg-soc] [soc]: r319 - qcelp/qcelpdec.c

reynaldo subversion at mplayerhq.hu
Thu Jul 5 23:39:25 CEST 2007


Author: reynaldo
Date: Thu Jul  5 23:39:25 2007
New Revision: 319

Log:
- Dont hide but solve possibly naughty pointer to const 
  issue spotted by gcc and Michael.


Modified:
   qcelp/qcelpdec.c

Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c	(original)
+++ qcelp/qcelpdec.c	Thu Jul  5 23:39:25 2007
@@ -76,7 +76,7 @@ static int qcelp_decode_frame(AVCodecCon
            int *data_size, uint8_t *buf, int buf_size)
 {
     QCELPContext *q    = avctx->priv_data;
-    QCELPBitmap *order = NULL;
+    const QCELPBitmap *order = NULL;
     int16_t  *outbuffer = data;
     int8_t   samples;
     int      n;
@@ -96,26 +96,22 @@ static int qcelp_decode_frame(AVCodecCon
         case 34:
             q->frame->rate = RATE_FULL;
             q->frame->bits = qcelp_bits_per_rate[RATE_FULL];
-            order =
-            (QCELPBitmap*)(QCELP_REFERENCE_FRAME + QCELP_FULLPKT_REFERENCE_POS);
+            order = QCELP_REFERENCE_FRAME + QCELP_FULLPKT_REFERENCE_POS;
             break;
         case 16:
             q->frame->rate = RATE_HALF;
             q->frame->bits = qcelp_bits_per_rate[RATE_HALF];
-            order =
-            (QCELPBitmap*)(QCELP_REFERENCE_FRAME + QCELP_HALFPKT_REFERENCE_POS);
+            order = QCELP_REFERENCE_FRAME + QCELP_HALFPKT_REFERENCE_POS;
             break;
         case 7:
             q->frame->rate = RATE_QUARTER;
             q->frame->bits = qcelp_bits_per_rate[RATE_QUARTER];
-            order =
-            (QCELPBitmap*)(QCELP_REFERENCE_FRAME + QCELP_4THRPKT_REFERENCE_POS);
+            order = QCELP_REFERENCE_FRAME + QCELP_4THRPKT_REFERENCE_POS;
             break;
         case 3:
             q->frame->rate = RATE_OCTAVE;
             q->frame->bits = qcelp_bits_per_rate[RATE_OCTAVE];
-            order =
-            (QCELPBitmap*)(QCELP_REFERENCE_FRAME + QCELP_8THRPKT_REFERENCE_POS);
+            order = QCELP_REFERENCE_FRAME + QCELP_8THRPKT_REFERENCE_POS;
             break;
         case 0: /* FIXME */
             q->frame->rate = BLANK;



More information about the FFmpeg-soc mailing list