summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-02 17:43:05 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-02 17:43:05 +0000
commitc890da19bbdb3de77152947f014de0005fb49d68 (patch)
treea97b3eaf18d245d375b78f73020c0b937f9316f2 /mencoder.c
parent77abad770c61e83a42ac762d2216b7fa678859ac (diff)
downloadmpv-c890da19bbdb3de77152947f014de0005fb49d68.tar.bz2
mpv-c890da19bbdb3de77152947f014de0005fb49d68.tar.xz
fixed AVI header creation - now should be compatible with NaNdub
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2636 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/mencoder.c b/mencoder.c
index 4f7a03cbbd..083a80ae69 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -415,7 +415,7 @@ case VCODEC_DIVX4:
mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
mux_v->bih->biWidth=sh_video->disp_w;
mux_v->bih->biHeight=sh_video->disp_h;
- mux_v->bih->biPlanes=0;
+ mux_v->bih->biPlanes=1;
mux_v->bih->biBitCount=24;
mux_v->bih->biCompression=mmioFOURCC('d','i','v','x');
mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
@@ -460,14 +460,21 @@ case ACODEC_VBRMP3:
mux_a->h.dwSampleSize=0; // VBR
mux_a->h.dwScale=4608/4;
mux_a->h.dwRate=sh_audio->samplerate;
- mux_a->wf=malloc(sizeof(WAVEFORMATEX));
+ if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_msg(MSGT_MENCODER,MSGL_WARN,"sizeof(MPEGLAYER3WAVEFORMAT)==%d!=30, maybe broken C compiler?\n",sizeof(MPEGLAYER3WAVEFORMAT));
+ mux_a->wf=malloc(sizeof(MPEGLAYER3WAVEFORMAT)); // should be 30
mux_a->wf->wFormatTag=0x55; // MP3
mux_a->wf->nChannels=sh_audio->channels;
mux_a->wf->nSamplesPerSec=sh_audio->samplerate;
- mux_a->wf->nAvgBytesPerSec=0;
+ mux_a->wf->nAvgBytesPerSec=192000/8; // FIXME!
mux_a->wf->nBlockAlign=1;
- mux_a->wf->wBitsPerSample=16;
- mux_a->wf->cbSize=0; // FIXME for l3codeca.acm
+ mux_a->wf->wBitsPerSample=0; //16;
+ // from NaNdub: (requires for l3codeca.acm)
+ mux_a->wf->cbSize=12;
+ ((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->wID=1;
+ ((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->fdwFlags=2;
+ ((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize=1024; // ???
+ ((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nFramesPerBlock=1;
+ ((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nCodecDelay=0;
break;
}
}