Revision 4cf2e30f

View differences:

libavcodec/tta.c
263 263
            return -1;
264 264
        }
265 265
        else switch(s->bps) {
266
//            case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
266
            case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
267 267
            case 2: avctx->sample_fmt = AV_SAMPLE_FMT_S16; break;
268 268
//            case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
269 269
            case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
......
442 442

  
443 443
        // convert to output buffer
444 444
        switch(s->bps) {
445
            case 1: {
446
                uint8_t *samples = data;
447
                for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++)
448
                    *samples++ = *p + 0x80;
449
                *data_size = samples - (uint8_t *)data;
450
                break;
451
            }
445 452
            case 2: {
446 453
                uint16_t *samples = data;
447 454
                for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) {

Also available in: Unified diff