[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.13,1.14
Alex Beregszaszi
alex at mplayerhq.hu
Sun May 5 02:31:43 CEST 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv15160
Modified Files:
ve_lavc.c
Log Message:
a hack to make ffmjpeg created files viewable with windows dlls too
Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ve_lavc.c 4 May 2002 18:18:10 -0000 1.13
+++ ve_lavc.c 5 May 2002 00:31:40 -0000 1.14
@@ -272,15 +272,28 @@
memset(vf->priv,0,sizeof(struct vf_priv_s));
vf->priv->mux=args;
- mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
- mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+ /* XXX: hack: some of the MJPEG decoder DLL's needs exported huffman
+ table, so we define a zero-table, also lavc mjpeg encoder is putting
+ huffman tables into the stream, so no problem */
+ if (lavc_param_vcodec && !strcasecmp(lavc_param_vcodec, "mjpeg"))
+ {
+ mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)+28);
+ memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER)+28);
+ mux_v->bih->biSize=sizeof(BITMAPINFOHEADER)+28;
+ }
+ else
+ {
+ mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
+ memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER));
+ mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+ }
mux_v->bih->biWidth=0;
mux_v->bih->biHeight=0;
mux_v->bih->biPlanes=1;
mux_v->bih->biBitCount=24;
if (!lavc_param_vcodec)
{
- printf("No libavcodec codec specified! It's requested!\n");
+ printf("No libavcodec codec specified! It's required!\n");
return 0;
}
@@ -320,7 +333,7 @@
vf_info_t ve_info_lavc = {
"libavcodec encoder",
"lavc",
- "A'rpi",
+ "A'rpi and Alex",
"for internal use by mencoder",
vf_open
};
More information about the MPlayer-cvslog
mailing list