summaryrefslogtreecommitdiff
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-17 08:27:54 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-19 00:08:02 +0000
commit4ebf30595106947fccdffa01b6848cae4bed92cd (patch)
treef705a50a60dc338d0223e30ddc14eff2ab0db0c2 /libavcodec/tta.c
parent445f36d7c83f9edb67920be7a928243704b5453e (diff)
lavc/tta: do not overwrite bits_per_coded_sample
It is supposed to be set in libavformat only. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 26b2b68e05..b0e538fe5d 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -205,8 +205,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
avctx->channels = s->channels = get_bits(&s->gb, 16);
if (s->channels > 1 && s->channels < 9)
avctx->channel_layout = tta_channel_layouts[s->channels-2];
- avctx->bits_per_coded_sample = get_bits(&s->gb, 16);
- s->bps = (avctx->bits_per_coded_sample + 7) / 8;
+ avctx->bits_per_raw_sample = get_bits(&s->gb, 16);
+ s->bps = (avctx->bits_per_raw_sample + 7) / 8;
avctx->sample_rate = get_bits_long(&s->gb, 32);
s->data_length = get_bits_long(&s->gb, 32);
skip_bits_long(&s->gb, 32); // CRC32 of header
@@ -223,11 +223,9 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
case 2:
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
- avctx->bits_per_raw_sample = 16;
break;
case 3:
avctx->sample_fmt = AV_SAMPLE_FMT_S32;
- avctx->bits_per_raw_sample = 24;
break;
//case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
default: