aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-05 00:31:40 +0000
committerGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-05 00:31:40 +0000
commit8152743089963e32a77828a46a8d5cf90141a02c (patch)
tree63540ab9995b3508c654c9d8f7dd26dd24d6ece9 /libmpcodecs
parent984c03c89a2bc9df4105842906acf93139050676 (diff)
a hack to make ffmjpeg created files viewable with windows dlls too
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5978 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ve_lavc.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 41243233c6..da954602f6 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -272,15 +272,28 @@ static int vf_open(vf_instance_t *vf, char* args){
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 @@ static int vf_open(vf_instance_t *vf, char* args){
vf_info_t ve_info_lavc = {
"libavcodec encoder",
"lavc",
- "A'rpi",
+ "A'rpi and Alex",
"for internal use by mencoder",
vf_open
};