mirror of
https://github.com/mpv-player/mpv
synced 2025-02-11 01:17:28 +00:00
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
This commit is contained in:
parent
984c03c89a
commit
8152743089
@ -272,15 +272,28 @@ static int vf_open(vf_instance_t *vf, char* args){
|
|||||||
memset(vf->priv,0,sizeof(struct vf_priv_s));
|
memset(vf->priv,0,sizeof(struct vf_priv_s));
|
||||||
vf->priv->mux=args;
|
vf->priv->mux=args;
|
||||||
|
|
||||||
mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
|
/* XXX: hack: some of the MJPEG decoder DLL's needs exported huffman
|
||||||
mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
|
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->biWidth=0;
|
||||||
mux_v->bih->biHeight=0;
|
mux_v->bih->biHeight=0;
|
||||||
mux_v->bih->biPlanes=1;
|
mux_v->bih->biPlanes=1;
|
||||||
mux_v->bih->biBitCount=24;
|
mux_v->bih->biBitCount=24;
|
||||||
if (!lavc_param_vcodec)
|
if (!lavc_param_vcodec)
|
||||||
{
|
{
|
||||||
printf("No libavcodec codec specified! It's requested!\n");
|
printf("No libavcodec codec specified! It's required!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +333,7 @@ static int vf_open(vf_instance_t *vf, char* args){
|
|||||||
vf_info_t ve_info_lavc = {
|
vf_info_t ve_info_lavc = {
|
||||||
"libavcodec encoder",
|
"libavcodec encoder",
|
||||||
"lavc",
|
"lavc",
|
||||||
"A'rpi",
|
"A'rpi and Alex",
|
||||||
"for internal use by mencoder",
|
"for internal use by mencoder",
|
||||||
vf_open
|
vf_open
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user