Mercurial > libavformat.hg
changeset 4767:2da42f33de42 libavformat
Make Smacker audio decoder output audio in original bit depth
Patch by Daniel Verkamp
($firstname) at (three-letter file extension for drivers in Win 3.1) dot (nu)
Thread: [PATCH] Smacker: Output audio in original bit depth
author | kostya |
---|---|
date | Sat, 21 Mar 2009 15:52:14 +0000 |
parents | 6567b8869917 |
children | 667428b99cc3 |
files | smacker.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/smacker.c Sat Mar 21 08:22:36 2009 +0000 +++ b/smacker.c Sat Mar 21 15:52:14 2009 +0000 @@ -183,6 +183,7 @@ ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8; if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8) ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; + ast[i]->codec->sample_fmt = ast[i]->codec->bits_per_coded_sample == 8 ? SAMPLE_FMT_U8 : SAMPLE_FMT_S16; av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8); }