Revision 0e03f94d libavcodec/libopencore-amr.c

View differences:

libavcodec/libopencore-amr.c
112 112
    const uint8_t *buf = avpkt->data;
113 113
    int buf_size       = avpkt->size;
114 114
    AMRContext *s = avctx->priv_data;
115
    const uint8_t *amrData = buf;
116 115
    static const uint8_t block_size[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 };
117 116
    enum Mode dec_mode;
118 117
    int packet_size;
......
130 129
    }
131 130

  
132 131
    s->frameCount++;
133
    /* av_log(NULL, AV_LOG_DEBUG, "packet_size=%d amrData= 0x%X %X %X %X\n",
134
              packet_size, amrData[0], amrData[1], amrData[2], amrData[3]); */
132
    /* av_log(NULL, AV_LOG_DEBUG, "packet_size=%d buf= 0x%X %X %X %X\n",
133
              packet_size, buf[0], buf[1], buf[2], buf[3]); */
135 134
    /* call decoder */
136
    Decoder_Interface_Decode(s->decState, amrData, data, 0);
135
    Decoder_Interface_Decode(s->decState, buf, data, 0);
137 136
    *data_size = 160 * 2;
138 137

  
139 138
    return packet_size;
......
262 261
    const uint8_t *buf = avpkt->data;
263 262
    int buf_size       = avpkt->size;
264 263
    AMRWBContext *s = avctx->priv_data;
265
    const uint8_t *amrData = buf;
266 264
    int mode;
267 265
    int packet_size;
268 266
    static const uint8_t block_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1};
......
271 269
        /* nothing to do */
272 270
        return 0;
273 271

  
274
    mode = (amrData[0] >> 3) & 0x000F;
272
    mode = (buf[0] >> 3) & 0x000F;
275 273
    packet_size = block_size[mode];
276 274

  
277 275
    if (packet_size > buf_size) {
......
281 279
    }
282 280

  
283 281
    s->frameCount++;
284
    D_IF_decode(s->state, amrData, data, _good_frame);
282
    D_IF_decode(s->state, buf, data, _good_frame);
285 283
    *data_size = 320 * 2;
286 284
    return packet_size;
287 285
}

Also available in: Unified diff