mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 21:28:08 +00:00
fix size of wav file for media player
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@534 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
24fdc43a42
commit
3c46e09288
1 changed files with 9 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ static void write_wav_header(int rate,int size, char *filename){
|
|||
}
|
||||
|
||||
static int rec_open(MSFilter *f, void *arg){
|
||||
wave_header_t header;
|
||||
DWORD bytes_written=0;
|
||||
|
||||
RecState *s=(RecState*)f->data;
|
||||
const char *filename=(const char*)arg;
|
||||
ms_mutex_lock(&f->lock);
|
||||
|
|
@ -141,6 +144,12 @@ static int rec_open(MSFilter *f, void *arg){
|
|||
return -1;
|
||||
}
|
||||
|
||||
memset(&header ,0,sizeof(header));
|
||||
WriteFile(s->fd,&header,sizeof(header), &bytes_written, NULL);
|
||||
if (bytes_written!=sizeof(header)){
|
||||
ms_warning("Fail to write wav header.");
|
||||
}
|
||||
|
||||
s->state=Stopped;
|
||||
ms_mutex_unlock(&f->lock);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue