Mercurial > mplayer.hg
comparison libmpcodecs/ae_pcm.c @ 32105:c08363dc5320
Replace sizoef(type) by sizeof(*ptrvar).
Besides being consistent with FFmpeg style,
this reduces the size of a patch to rename these
types to not conflict with the windows.h definitions.
author | reimar |
---|---|
date | Sun, 12 Sep 2010 13:01:05 +0000 |
parents | 32725ca88fed |
children |
comparison
equal
deleted
inserted
replaced
32104:e24003316c1c | 32105:c08363dc5320 |
---|---|
35 | 35 |
36 static int bind_pcm(audio_encoder_t *encoder, muxer_stream_t *mux_a) | 36 static int bind_pcm(audio_encoder_t *encoder, muxer_stream_t *mux_a) |
37 { | 37 { |
38 mux_a->h.dwScale=1; | 38 mux_a->h.dwScale=1; |
39 mux_a->h.dwRate=encoder->params.sample_rate; | 39 mux_a->h.dwRate=encoder->params.sample_rate; |
40 mux_a->wf=malloc(sizeof(WAVEFORMATEX)); | 40 mux_a->wf=malloc(sizeof(*mux_a->wf)); |
41 mux_a->wf->wFormatTag=0x1; // PCM | 41 mux_a->wf->wFormatTag=0x1; // PCM |
42 mux_a->wf->nChannels=encoder->params.channels; | 42 mux_a->wf->nChannels=encoder->params.channels; |
43 mux_a->h.dwSampleSize=2*mux_a->wf->nChannels; | 43 mux_a->h.dwSampleSize=2*mux_a->wf->nChannels; |
44 mux_a->wf->nBlockAlign=mux_a->h.dwSampleSize; | 44 mux_a->wf->nBlockAlign=mux_a->h.dwSampleSize; |
45 mux_a->wf->nSamplesPerSec=mux_a->h.dwRate; | 45 mux_a->wf->nSamplesPerSec=mux_a->h.dwRate; |