Mercurial > mplayer.hg
diff libmpdemux/demux_lavf.c @ 32111:7c8d240d37a6
Replace sizeof(type)
author | reimar |
---|---|
date | Sun, 12 Sep 2010 13:26:39 +0000 |
parents | 77b4e83fe42d |
children | a5ed4bcb1149 |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Sun Sep 12 13:14:18 2010 +0000 +++ b/libmpdemux/demux_lavf.c Sun Sep 12 13:26:39 2010 +0000 @@ -276,7 +276,7 @@ break; stream_type = "audio"; priv->astreams[priv->audio_streams] = i; - wf= calloc(sizeof(WAVEFORMATEX) + codec->extradata_size, 1); + wf= calloc(sizeof(*wf) + codec->extradata_size, 1); // mp4a tag is used for all mp4 files no matter what they actually contain if(codec->codec_tag == MKTAG('m', 'p', '4', 'a')) codec->codec_tag= 0; @@ -348,7 +348,7 @@ if(!sh_video) break; stream_type = "video"; priv->vstreams[priv->video_streams] = i; - bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1); + bih=calloc(sizeof(*bih) + codec->extradata_size,1); if(codec->codec_id == CODEC_ID_RAWVIDEO) { switch (codec->pix_fmt) { @@ -358,7 +358,7 @@ } if(!codec->codec_tag) codec->codec_tag= av_codec_get_tag(mp_bmp_taglists, codec->codec_id); - bih->biSize= sizeof(BITMAPINFOHEADER) + codec->extradata_size; + bih->biSize= sizeof(*bih) + codec->extradata_size; bih->biWidth= codec->width; bih->biHeight= codec->height; bih->biBitCount= codec->bits_per_coded_sample;