diff options
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r-- | libavcodec/tta.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index a388cfde96..857b895e7a 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -324,6 +324,10 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, return ret; } + // decode directly to output buffer for 24-bit sample format + if (s->bps == 3) + s->decode_buffer = s->frame.data[0]; + // init per channel states for (i = 0; i < s->channels; i++) { s->ch_ctx[i].predictor = 0; @@ -429,7 +433,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, // shift samples for 24-bit sample format int32_t *samples = (int32_t *)s->frame.data[0]; for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) - *samples++ = *p<<8; + *samples++ <<= 8; // reset decode buffer s->decode_buffer = NULL; break; |