aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-07-28 13:43:24 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-07-28 13:43:24 +0000
commit70c9aca23b3d0a729c278c3cb76a290a2748d6c8 (patch)
tree5b5816ea532d5503c66af9a633b6c38620884b5e /libmpdemux
parent97a62d4a161fdd7013f2cd59b1845c2c75ac0d37 (diff)
lavf demuxer with raw PCM fix (and a related hang)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16135 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_lavf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 439f2ba718..bc832b3c7e 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -217,6 +217,16 @@ int demux_open_lavf(demuxer_t *demuxer){
sh_audio->channels= codec->channels;
sh_audio->samplerate= codec->sample_rate;
sh_audio->i_bps= codec->bit_rate/8;
+ switch (codec->codec_id) {
+ case CODEC_ID_PCM_S8:
+ case CODEC_ID_PCM_U8:
+ sh_audio->samplesize = 1;
+ case CODEC_ID_PCM_S16LE:
+ case CODEC_ID_PCM_S16BE:
+ case CODEC_ID_PCM_U16LE:
+ case CODEC_ID_PCM_U16BE:
+ sh_audio->samplesize = 2;
+ }
if(verbose>=1) print_wave_header(sh_audio->wf);
if(demuxer->audio->id != i && demuxer->audio->id != -1)
st->discard= AVDISCARD_ALL;