diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-21 18:02:33 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-21 18:02:33 +0000 |
commit | 07685ad398369f5f06f5d23d5e83a945c0074519 (patch) | |
tree | 8b1f137f86040ca92e4bf4e755b41ab81701a288 /libmpdemux | |
parent | a9fdc2bf7debc0f82f95c14783290fbeda8db3d5 (diff) |
With the latest change to dec_audio.c (1.32) the demuxers have to set sh_a->samplesize to something != 0.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13425 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mkv.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 12566d6235..be27e69c00 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -1794,33 +1794,36 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track) sh_a->wf->nChannels = track->a_channels; sh_a->samplerate = (uint32_t) track->a_sfreq; sh_a->wf->nSamplesPerSec = (uint32_t) track->a_sfreq; - sh_a->samplesize = track->a_bps / 8; + if (track->a_bps == 0) + { + sh_a->samplesize = 2; + sh_a->wf->wBitsPerSample = 16; + } + else + { + sh_a->samplesize = track->a_bps / 8; + sh_a->wf->wBitsPerSample = track->a_bps; + } if (track->a_formattag == 0x0055) /* MP3 || MP2 */ { sh_a->wf->nAvgBytesPerSec = 16000; sh_a->wf->nBlockAlign = 1152; - sh_a->wf->wBitsPerSample = 0; - sh_a->samplesize = 0; } else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3))) { sh_a->wf->nAvgBytesPerSec = 16000; sh_a->wf->nBlockAlign = 1536; - sh_a->wf->wBitsPerSample = 0; - sh_a->samplesize = 0; } else if (track->a_formattag == 0x0001) /* PCM || PCM_BE */ { sh_a->wf->nAvgBytesPerSec = sh_a->channels * sh_a->samplerate*2; sh_a->wf->nBlockAlign = sh_a->wf->nAvgBytesPerSec; - sh_a->wf->wBitsPerSample = track->a_bps; if (!strcmp(track->codec_id, MKV_A_PCM_BE)) sh_a->format = mmioFOURCC('t', 'w', 'o', 's'); } else if (!strcmp(track->codec_id, MKV_A_QDMC) || !strcmp(track->codec_id, MKV_A_QDMC2)) { - sh_a->wf->wBitsPerSample = track->a_bps; sh_a->wf->nAvgBytesPerSec = 16000; sh_a->wf->nBlockAlign = 1486; track->fix_i_bps = 1; @@ -1839,8 +1842,6 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track) sh_a->wf->nAvgBytesPerSec = 16000; sh_a->wf->nBlockAlign = 1024; - sh_a->wf->wBitsPerSample = 0; - sh_a->samplesize = 0; /* Recreate the 'private data' */ /* which faad2 uses in its initialization */ @@ -1899,7 +1900,6 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track) ra4p = (real_audio_v4_props_t *) track->private_data; ra5p = (real_audio_v5_props_t *) track->private_data; - sh_a->wf->wBitsPerSample = sh_a->samplesize * 8; sh_a->wf->nAvgBytesPerSec = 0; /* FIXME !? */ sh_a->wf->nBlockAlign = be2me_16 (ra4p->frame_size); |