[MPlayer-cvslog] r32207 - in trunk: TOOLS/vivodump.c libmpcodecs/ve_libdv.c libmpcodecs/ve_nuv.c libmpcodecs/ve_x264.c libmpcodecs/ve_xvid4.c libmpdemux/demux_gif.c libmpdemux/demux_lmlm4.c libmpdemux/demux_mng.c l...
reimar
subversion at mplayerhq.hu
Sun Sep 12 18:08:57 CEST 2010
Author: reimar
Date: Sun Sep 12 18:08:57 2010
New Revision: 32207
Log:
Replace sizeof(BITMAPINFOHEADER)
Modified:
trunk/TOOLS/vivodump.c
trunk/libmpcodecs/ve_libdv.c
trunk/libmpcodecs/ve_nuv.c
trunk/libmpcodecs/ve_x264.c
trunk/libmpcodecs/ve_xvid4.c
trunk/libmpdemux/demux_gif.c
trunk/libmpdemux/demux_lmlm4.c
trunk/libmpdemux/demux_mng.c
trunk/libmpdemux/demux_nemesi.c
trunk/libmpdemux/demux_nut.c
trunk/libmpdemux/demux_ogg.c
trunk/libmpdemux/demux_rawdv.c
Modified: trunk/TOOLS/vivodump.c
==============================================================================
--- trunk/TOOLS/vivodump.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/TOOLS/vivodump.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -212,8 +212,8 @@ mux->buffer=malloc(mux->buffer_size);
mux->h.dwScale=1;
mux->h.dwRate=10;
-mux->bih=malloc(sizeof(BITMAPINFOHEADER));
-mux->bih->biSize=sizeof(BITMAPINFOHEADER);
+mux->bih=malloc(sizeof(*mux->bih));
+mux->bih->biSize=sizeof(*mux->bih);
mux->bih->biPlanes=1;
mux->bih->biBitCount=24;
mux->bih->biCompression=0x6f766976;// 7669766f;
Modified: trunk/libmpcodecs/ve_libdv.c
==============================================================================
--- trunk/libmpcodecs/ve_libdv.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpcodecs/ve_libdv.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -113,8 +113,8 @@ static int vf_open(vf_instance_t *vf, ch
vf->priv->enc=dv_encoder_new(0,1,1); // FIXME, parse some options!
if(!vf->priv->enc) return 0;
- mux_v->bih=calloc(1, sizeof(BITMAPINFOHEADER));
- mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+ mux_v->bih=calloc(1, sizeof(*mux_v->bih));
+ mux_v->bih->biSize=sizeof(*mux_v->bih);
mux_v->bih->biWidth=0;
mux_v->bih->biHeight=0;
mux_v->bih->biCompression=mmioFOURCC('d','v','s','d');
Modified: trunk/libmpcodecs/ve_nuv.c
==============================================================================
--- trunk/libmpcodecs/ve_nuv.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpcodecs/ve_nuv.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -225,8 +225,8 @@ static int vf_open(vf_instance_t *vf, ch
memcpy(vf->priv, &nuv_priv_dflt,sizeof(struct vf_priv_s));
vf->priv->mux=(muxer_stream_t*)args;
- mux_v->bih=calloc(1, sizeof(BITMAPINFOHEADER));
- mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+ mux_v->bih=calloc(1, sizeof(*mux_v->bih));
+ mux_v->bih->biSize=sizeof(*mux_v->bih);
mux_v->bih->biWidth=0;
mux_v->bih->biHeight=0;
mux_v->bih->biPlanes=1;
Modified: trunk/libmpcodecs/ve_x264.c
==============================================================================
--- trunk/libmpcodecs/ve_x264.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpcodecs/ve_x264.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -185,9 +185,9 @@ static int config(struct vf_instance *vf
extradata_size = x264_encoder_headers(mod->x264, &nal, &nnal);
- mod->mux->bih= realloc(mod->mux->bih, sizeof(BITMAPINFOHEADER) + extradata_size);
+ mod->mux->bih= realloc(mod->mux->bih, sizeof(*mod->mux->bih) + extradata_size);
memcpy(mod->mux->bih + 1, nal->p_payload, extradata_size);
- mod->mux->bih->biSize= sizeof(BITMAPINFOHEADER) + extradata_size;
+ mod->mux->bih->biSize= sizeof(*mod->mux->bih) + extradata_size;
}
if (param.i_bframe > 1 && param.i_bframe_pyramid)
@@ -293,8 +293,8 @@ static int vf_open(vf_instance_t *vf, ch
mod=(h264_module_t*)vf->priv;
mod->mux = (muxer_stream_t*)args;
- mod->mux->bih = calloc(1, sizeof(BITMAPINFOHEADER));
- mod->mux->bih->biSize = sizeof(BITMAPINFOHEADER);
+ mod->mux->bih = calloc(1, sizeof(*mod->mux->bih));
+ mod->mux->bih->biSize = sizeof(*mod->mux->bih);
mod->mux->bih->biPlanes = 1;
mod->mux->bih->biBitCount = 24;
mod->mux->bih->biCompression = mmioFOURCC('h', '2', '6', '4');
Modified: trunk/libmpcodecs/ve_xvid4.c
==============================================================================
--- trunk/libmpcodecs/ve_xvid4.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpcodecs/ve_xvid4.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -605,7 +605,7 @@ vf_open(vf_instance_t *vf, char* args)
mod->mux = (muxer_stream_t*)args;
/* Initialize muxer BITMAP header */
- mod->mux->bih = calloc(1, sizeof(BITMAPINFOHEADER));
+ mod->mux->bih = calloc(1, sizeof(*mod->mux->bih));
if(mod->mux->bih == NULL) {
mp_msg(MSGT_MENCODER,MSGL_ERR,
@@ -613,7 +613,7 @@ vf_open(vf_instance_t *vf, char* args)
return BAD;
}
- mod->mux->bih->biSize = sizeof(BITMAPINFOHEADER);
+ mod->mux->bih->biSize = sizeof(*mod->mux->bih);
mod->mux->bih->biWidth = 0;
mod->mux->bih->biHeight = 0;
mod->mux->bih->biPlanes = 1;
Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_gif.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -280,7 +280,7 @@ static demuxer_t* demux_open_gif(demuxer
sh_video->fps = 5.0f;
sh_video->frametime = 1.0f / sh_video->fps;
- sh_video->bih = malloc(sizeof(BITMAPINFOHEADER) + (256 * 4));
+ sh_video->bih = malloc(sizeof(*sh_video->bih) + (256 * 4));
sh_video->bih->biCompression = sh_video->format;
sh_video->bih->biWidth = priv->w = (uint16_t)gif->SWidth;
sh_video->bih->biHeight = priv->h = (uint16_t)gif->SHeight;
Modified: trunk/libmpdemux/demux_lmlm4.c
==============================================================================
--- trunk/libmpdemux/demux_lmlm4.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_lmlm4.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -310,7 +310,7 @@ static demuxer_t* demux_open_lmlm4(demux
sh_video->disp_h = 480;
sh_video->format = mmioFOURCC('D','I','V','X');
- sh_video->bih = calloc(1, sizeof(BITMAPINFOHEADER));
+ sh_video->bih = calloc(1, sizeof(*sh_video->bih));
/* these are false values */
sh_video->bih->biSize = 40;
Modified: trunk/libmpdemux/demux_mng.c
==============================================================================
--- trunk/libmpdemux/demux_mng.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_mng.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -444,7 +444,7 @@ static demuxer_t * demux_mng_open(demuxe
sh_video->frametime = 1.0f / sh_video->fps;
// set video frame parameters
- sh_video->bih = malloc(sizeof(BITMAPINFOHEADER));
+ sh_video->bih = malloc(sizeof(*sh_video->bih));
sh_video->bih->biCompression = sh_video->format;
sh_video->bih->biWidth = mng_priv->width;
sh_video->bih->biHeight = mng_priv->height;
Modified: trunk/libmpdemux/demux_nemesi.c
==============================================================================
--- trunk/libmpdemux/demux_nemesi.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_nemesi.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -269,12 +269,12 @@ static demuxer_t* demux_open_rtp(demuxer
sess, &buff, &fps);
if (buff.len) {
- bih = calloc(1,sizeof(BITMAPINFOHEADER)+buff.len);
- bih->biSize = sizeof(BITMAPINFOHEADER)+buff.len;
+ bih = calloc(1,sizeof(*bih)+buff.len);
+ bih->biSize = sizeof(*bih)+buff.len;
memcpy(bih+1, buff.data, buff.len);
} else {
- bih = calloc(1,sizeof(BITMAPINFOHEADER));
- bih->biSize = sizeof(BITMAPINFOHEADER);
+ bih = calloc(1,sizeof(*bih));
+ bih->biSize = sizeof(*bih);
}
sh_video = new_sh_video(demuxer,0);
Modified: trunk/libmpdemux/demux_nut.c
==============================================================================
--- trunk/libmpdemux/demux_nut.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_nut.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -147,7 +147,7 @@ static demuxer_t * demux_open_nut(demuxe
}
case NUT_VIDEO_CLASS: {
BITMAPINFOHEADER * bih =
- calloc(sizeof(BITMAPINFOHEADER) +
+ calloc(sizeof(*bih) +
s[i].codec_specific_len, 1);
sh_video_t * sh_video = new_sh_video(demuxer, i);
int j;
@@ -171,7 +171,7 @@ static demuxer_t * demux_open_nut(demuxe
s[i].sample_width / (float)s[i].sample_height;
sh_video->i_bps = 0; // FIXME
- bih->biSize = sizeof(BITMAPINFOHEADER) +
+ bih->biSize = sizeof(*bih) +
s[i].codec_specific_len;
bih->biWidth = s[i].width;
bih->biHeight = s[i].height;
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_ogg.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -906,8 +906,8 @@ int demux_ogg_open(demuxer_t *demuxer)
} else {
sh_v = new_sh_video_vid(demuxer, ogg_d->num_sub, n_video);
- sh_v->bih = calloc(1, sizeof(BITMAPINFOHEADER));
- sh_v->bih->biSize = sizeof(BITMAPINFOHEADER);
+ sh_v->bih = calloc(1, sizeof(*sh_v->bih));
+ sh_v->bih->biSize = sizeof(*sh_v->bih);
sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA;
sh_v->fps = ((double)inf.fps_numerator) / (double)inf.fps_denominator;
sh_v->frametime = ((double)inf.fps_denominator) / (double)inf.fps_numerator;
Modified: trunk/libmpdemux/demux_rawdv.c
==============================================================================
--- trunk/libmpdemux/demux_rawdv.c Sun Sep 12 18:03:46 2010 (r32206)
+++ trunk/libmpdemux/demux_rawdv.c Sun Sep 12 18:08:57 2010 (r32207)
@@ -190,7 +190,7 @@ static demuxer_t* demux_open_rawdv(demux
sh_video->frametime = 1.0/sh_video->fps;
// emulate BITMAPINFOHEADER for win32 decoders:
- sh_video->bih=calloc(1, sizeof(BITMAPINFOHEADER));
+ sh_video->bih=calloc(1, sizeof(*sh_video->bih));
sh_video->bih->biSize=40;
sh_video->bih->biWidth = dv_decoder->width;
sh_video->bih->biHeight = dv_decoder->height;
More information about the MPlayer-cvslog
mailing list