# HG changeset patch # User kostya # Date 1237650734 0 # Node ID 2da42f33de42374c002fff80fb7fee04d5638ddb # Parent 6567b8869917ba11e299d3c144cfadf68ec8e4b0 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 diff -r 6567b8869917 -r 2da42f33de42 smacker.c --- 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); }