aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDaniel Verkamp <daniel@drv.nu>2009-03-21 15:52:14 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-03-21 15:52:14 +0000
commite1dc16ae5673b54a35737bf0fa99a76c2d20e803 (patch)
tree1cd780c7f0c1cda158d469f62ce2e9a23ed43b29 /libavformat
parent2bbd85719c9402199ccbac60b6d6322f813e0885 (diff)
downloadffmpeg-e1dc16ae5673b54a35737bf0fa99a76c2d20e803.tar.gz
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 Originally committed as revision 18111 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/smacker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 8ec28bcd3b..7d0a8d59d4 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -183,6 +183,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
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);
}