Commit 3c46e092 authored by aymeric's avatar aymeric
Browse files

fix size of wav file for media player

git-svn-id: svn+ssh:// 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 24fdc43a
......@@ -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;
......@@ -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.");
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment