changeset 9725:b9f43efd98e7

fix wrong channel count w/ pcm encoding
author henry
date Sat, 29 Mar 2003 16:47:20 +0000
parents 77a31536f1e2
children c9a2a31bede0
files mencoder.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Sat Mar 29 14:37:23 2003 +0000
+++ b/mencoder.c	Sat Mar 29 16:47:20 2003 +0000
@@ -748,13 +748,13 @@
     break;
 case ACODEC_PCM:
     printf("CBR PCM audio selected\n");
-    mux_a->h.dwSampleSize=2*sh_audio->channels;
     mux_a->h.dwScale=1;
     mux_a->h.dwRate=force_srate?force_srate:sh_audio->samplerate;
     mux_a->wf=malloc(sizeof(WAVEFORMATEX));
-    mux_a->wf->nBlockAlign=mux_a->h.dwSampleSize;
     mux_a->wf->wFormatTag=0x1; // PCM
     mux_a->wf->nChannels=audio_output_channels?audio_output_channels:sh_audio->channels;
+    mux_a->h.dwSampleSize=2*mux_a->wf->nChannels;
+    mux_a->wf->nBlockAlign=mux_a->h.dwSampleSize;
     mux_a->wf->nSamplesPerSec=mux_a->h.dwRate;
     mux_a->wf->nAvgBytesPerSec=mux_a->h.dwSampleSize*mux_a->wf->nSamplesPerSec;
     mux_a->wf->wBitsPerSample=16;