summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-03 13:21:54 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-03 13:21:54 +0000
commit8f65768bf28cebdaf85ef75d9b0d22bfc35f6fd9 (patch)
tree5ed058c4a8f3272b6d8acc136ec13c1491a9c235 /libmpdemux
parent92f2863d63b75e30f13473a5d76cdb19cd5fc982 (diff)
downloadmpv-8f65768bf28cebdaf85ef75d9b0d22bfc35f6fd9.tar.bz2
mpv-8f65768bf28cebdaf85ef75d9b0d22bfc35f6fd9.tar.xz
rm unnecesary casts from void* - part 4
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18890 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_demuxers.c4
-rw-r--r--libmpdemux/demux_film.c8
-rw-r--r--libmpdemux/demux_mkv.c10
-rw-r--r--libmpdemux/demux_mpc.c4
-rw-r--r--libmpdemux/demux_mpg.c2
-rw-r--r--libmpdemux/demux_nsv.c2
-rw-r--r--libmpdemux/demux_ogg.c22
-rw-r--r--libmpdemux/dvdnav_stream.c6
-rw-r--r--libmpdemux/tvi_v4l.c16
-rw-r--r--libmpdemux/tvi_v4l2.c14
10 files changed, 44 insertions, 44 deletions
diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c
index 8d1db1d503..71440f8ed4 100644
--- a/libmpdemux/demux_demuxers.c
+++ b/libmpdemux/demux_demuxers.c
@@ -21,9 +21,9 @@ demuxer_t* new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd) {
demuxer_t* ret;
dd_priv_t* priv;
- ret = (demuxer_t*)calloc(1,sizeof(demuxer_t));
+ ret = calloc(1,sizeof(demuxer_t));
- priv = (dd_priv_t*)malloc(sizeof(dd_priv_t));
+ priv = malloc(sizeof(dd_priv_t));
priv->vd = vd;
priv->ad = ad;
priv->sd = sd;
diff --git a/libmpdemux/demux_film.c b/libmpdemux/demux_film.c
index 5f52e45a65..38a06546f5 100644
--- a/libmpdemux/demux_film.c
+++ b/libmpdemux/demux_film.c
@@ -221,7 +221,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
int counting_chunks;
unsigned int total_audio_bytes = 0;
- film_data = (film_data_t *)malloc(sizeof(film_data_t));
+ film_data = malloc(sizeof(film_data_t));
film_data->total_chunks = 0;
film_data->current_chunk = 0;
film_data->chunks = NULL;
@@ -310,7 +310,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
demuxer->audio->sh = sh_audio;
sh_audio->ds = demuxer->audio;
- sh_audio->wf = (WAVEFORMATEX *)malloc(sizeof(WAVEFORMATEX));
+ sh_audio->wf = malloc(sizeof(WAVEFORMATEX));
// uncompressed PCM format
sh_audio->wf->wFormatTag = 1;
@@ -341,7 +341,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
demuxer->audio->sh = sh_audio;
sh_audio->ds = demuxer->audio;
- sh_audio->wf = (WAVEFORMATEX *)malloc(sizeof(WAVEFORMATEX));
+ sh_audio->wf = malloc(sizeof(WAVEFORMATEX));
// uncompressed PCM format
sh_audio->wf->wFormatTag = 1;
@@ -377,7 +377,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
// allocate enough entries for the chunk
film_data->chunks =
- (film_chunk_t *)calloc(film_data->total_chunks, sizeof(film_chunk_t));
+ calloc(film_data->total_chunks, sizeof(film_chunk_t));
// build the chunk index
counting_chunks = 1;
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 2fc370b7a6..de75f00748 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -503,7 +503,7 @@ demux_mkv_parse_idx (mkv_track_t *t)
return 0;
things_found = 0;
- buf = (char *)malloc(t->private_size + 1);
+ buf = malloc(t->private_size + 1);
if (buf == NULL)
return 0;
memcpy(buf, t->private_data, t->private_size);
@@ -1891,7 +1891,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track)
track->qt_last_a_pts = 0.0;
if (track->private_data != NULL)
{
- sh_a->codecdata=(unsigned char *)malloc(track->private_size);
+ sh_a->codecdata=malloc(track->private_size);
memcpy (sh_a->codecdata, track->private_data,
track->private_size);
sh_a->codecdata_len = track->private_size;
@@ -1907,7 +1907,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track)
if (!strcmp (track->codec_id, MKV_A_AAC) &&
(NULL != track->private_data))
{
- sh_a->codecdata=(unsigned char *)malloc(track->private_size);
+ sh_a->codecdata=malloc(track->private_size);
memcpy (sh_a->codecdata, track->private_data,
track->private_size);
sh_a->codecdata_len = track->private_size;
@@ -2495,7 +2495,7 @@ demux_mkv_read_block_lacing (uint8_t *buffer, uint64_t *size,
{
case 0: /* no lacing */
*laces = 1;
- lace_size = (uint32_t *)calloc(*laces, sizeof(uint32_t));
+ lace_size = calloc(*laces, sizeof(uint32_t));
lace_size[0] = *size;
break;
@@ -2505,7 +2505,7 @@ demux_mkv_read_block_lacing (uint8_t *buffer, uint64_t *size,
*laces = *buffer++;
(*size)--;
(*laces)++;
- lace_size = (uint32_t *)calloc(*laces, sizeof(uint32_t));
+ lace_size = calloc(*laces, sizeof(uint32_t));
switch ((flags & 0x06) >> 1)
{
diff --git a/libmpdemux/demux_mpc.c b/libmpdemux/demux_mpc.c
index 99b61677f3..7fb3a2a92c 100644
--- a/libmpdemux/demux_mpc.c
+++ b/libmpdemux/demux_mpc.c
@@ -78,7 +78,7 @@ static demuxer_t *demux_mpc_open(demuxer_t* demuxer) {
sh_audio = new_sh_audio(demuxer,0);
{
- char *wf = (char *)calloc(1, sizeof(WAVEFORMATEX) + HDR_SIZE);
+ char *wf = calloc(1, sizeof(WAVEFORMATEX) + HDR_SIZE);
char *header = &wf[sizeof(WAVEFORMATEX)];
const int freqs[4] = {44100, 48000, 37800, 32000};
int frames;
@@ -102,7 +102,7 @@ static demuxer_t *demux_mpc_open(demuxer_t* demuxer) {
demuxer->movi_end = s->end_pos;
}
- priv = (da_priv_t *)malloc(sizeof(da_priv_t));
+ priv = malloc(sizeof(da_priv_t));
priv->last_pts = -1;
priv->pts_per_packet = (32 * 36) / (float)sh_audio->wf->nSamplesPerSec;
priv->length = seconds;
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index 1a71a32b92..bf6b88f4b5 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -111,7 +111,7 @@ static demuxer_t* demux_mpg_open(demuxer_t* demuxer) {
mpg_demuxer_t* mpg_d;
if (!ds_fill_buffer(demuxer->video)) return 0;
- mpg_d = (mpg_demuxer_t*)calloc(1,sizeof(mpg_demuxer_t));
+ mpg_d = calloc(1,sizeof(mpg_demuxer_t));
demuxer->priv = mpg_d;
mpg_d->final_pts = 0.0;
mpg_d->has_valid_timestamps = 1;
diff --git a/libmpdemux/demux_nsv.c b/libmpdemux/demux_nsv.c
index f06cff7b19..f1f401b515 100644
--- a/libmpdemux/demux_nsv.c
+++ b/libmpdemux/demux_nsv.c
@@ -209,7 +209,7 @@ static demuxer_t* demux_open_nsv ( demuxer_t* demuxer )
// new video stream! parse header
sh_video->disp_w=hdr[12]|(hdr[13]<<8);
sh_video->disp_h=hdr[14]|(hdr[15]<<8);
- sh_video->bih=(BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER));
+ sh_video->bih=calloc(1,sizeof(BITMAPINFOHEADER));
sh_video->bih->biSize=sizeof(BITMAPINFOHEADER);
sh_video->bih->biPlanes=1;
sh_video->bih->biBitCount=24;
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index 9208dd34e9..60df3bda47 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -248,7 +248,7 @@ void demux_ogg_init_sub (void) {
int lcv;
if(!ogg_sub.text[0]) // not yet allocated
for (lcv = 0; lcv < SUB_MAX_TEXT; lcv++) {
- ogg_sub.text[lcv] = (char*)malloc(OGG_SUB_MAX_LINE);
+ ogg_sub.text[lcv] = malloc(OGG_SUB_MAX_LINE);
}
}
@@ -813,7 +813,7 @@ static void fixup_vorbis_wf(sh_audio_t *sh, ogg_demuxer_t *od)
od->vi_inited = 1;
len = op[0].bytes + op[1].bytes + op[2].bytes;
- sh->wf = (WAVEFORMATEX*)calloc(1, sizeof(WAVEFORMATEX) + len + len/255 + 64);
+ sh->wf = calloc(1, sizeof(WAVEFORMATEX) + len + len/255 + 64);
ptr = (unsigned char*) (sh->wf+1);
ptr[0] = 2;
@@ -879,7 +879,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
s = demuxer->stream;
demuxer->priv =
- ogg_d = (ogg_demuxer_t*)calloc(1,sizeof(ogg_demuxer_t));
+ ogg_d = calloc(1,sizeof(ogg_demuxer_t));
sync = &ogg_d->sync;
page = &ogg_d->page;
@@ -948,7 +948,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (Vorbis), -aid %d\n",ogg_d->num_sub,n_audio-1);
} else if (pack.bytes >= 80 && !strncmp(pack.packet,"Speex", 5)) {
sh_a = new_sh_audio(demuxer, ogg_d->num_sub);
- sh_a->wf = (WAVEFORMATEX*)calloc(1, sizeof(WAVEFORMATEX) + pack.bytes);
+ sh_a->wf = calloc(1, sizeof(WAVEFORMATEX) + pack.bytes);
sh_a->format = FOURCC_SPEEX;
sh_a->samplerate = sh_a->wf->nSamplesPerSec = get_uint32(&pack.packet[36]);
sh_a->channels = sh_a->wf->nChannels = get_uint32(&pack.packet[48]);
@@ -986,7 +986,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
sh_v = new_sh_video(demuxer,ogg_d->num_sub);
sh_v->context = NULL;
- sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER));
+ sh_v->bih = calloc(1,sizeof(BITMAPINFOHEADER));
sh_v->bih->biSize=sizeof(BITMAPINFOHEADER);
sh_v->bih->biCompression= sh_v->format = FOURCC_THEORA;
sh_v->fps = ((double)inf.fps_numerator)/
@@ -1032,7 +1032,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
// Old video header
if(get_uint32 (pack.packet+96) == 0x05589f80 && pack.bytes >= 184) {
sh_v = new_sh_video(demuxer,ogg_d->num_sub);
- sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER));
+ sh_v->bih = calloc(1,sizeof(BITMAPINFOHEADER));
sh_v->bih->biSize=sizeof(BITMAPINFOHEADER);
sh_v->bih->biCompression=
sh_v->format = mmioFOURCC(pack.packet[68],pack.packet[69],
@@ -1058,7 +1058,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
unsigned int extra_size;
sh_a = new_sh_audio(demuxer,ogg_d->num_sub);
extra_size = get_uint16(pack.packet+140);
- sh_a->wf = (WAVEFORMATEX*)calloc(1,sizeof(WAVEFORMATEX)+extra_size);
+ sh_a->wf = calloc(1,sizeof(WAVEFORMATEX)+extra_size);
sh_a->format = sh_a->wf->wFormatTag = get_uint16(pack.packet+124);
sh_a->channels = sh_a->wf->nChannels = get_uint16(pack.packet+126);
sh_a->samplerate = sh_a->wf->nSamplesPerSec = get_uint32(pack.packet+128);
@@ -1086,7 +1086,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
/// New video header
if(strncmp(st->streamtype,"video",5) == 0) {
sh_v = new_sh_video(demuxer,ogg_d->num_sub);
- sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER));
+ sh_v->bih = calloc(1,sizeof(BITMAPINFOHEADER));
sh_v->bih->biSize=sizeof(BITMAPINFOHEADER);
sh_v->bih->biCompression=
sh_v->format = mmioFOURCC(st->subtype[0],st->subtype[1],
@@ -1127,7 +1127,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
}
sh_a = new_sh_audio(demuxer,ogg_d->num_sub);
- sh_a->wf = (WAVEFORMATEX*)calloc(1,sizeof(WAVEFORMATEX)+extra_size);
+ sh_a->wf = calloc(1,sizeof(WAVEFORMATEX)+extra_size);
sh_a->format = sh_a->wf->wFormatTag = strtol(buffer, NULL, 16);
sh_a->channels = sh_a->wf->nChannels = get_uint16(&st->sh.audio.channels);
sh_a->samplerate = sh_a->wf->nSamplesPerSec = get_uint64(&st->samples_per_unit);
@@ -1368,9 +1368,9 @@ demuxer_t* init_avi_with_ogg(demuxer_t* demuxer) {
}
// Build the ogg demuxer private datas
- ogg_d = (ogg_demuxer_t*)calloc(1,sizeof(ogg_demuxer_t));
+ ogg_d = calloc(1,sizeof(ogg_demuxer_t));
ogg_d->num_sub = 1;
- ogg_d->subs = (ogg_stream_t*)malloc(sizeof(ogg_stream_t));
+ ogg_d->subs = malloc(sizeof(ogg_stream_t));
ogg_d->subs[0].vorbis = 1;
// Init the ogg physical stream
diff --git a/libmpdemux/dvdnav_stream.c b/libmpdemux/dvdnav_stream.c
index 9e28ca6e45..e8c6965d76 100644
--- a/libmpdemux/dvdnav_stream.c
+++ b/libmpdemux/dvdnav_stream.c
@@ -59,7 +59,7 @@ dvdnav_priv_t * new_dvdnav_stream(char * filename) {
if (!filename)
return NULL;
- if (!(dvdnav_priv=(dvdnav_priv_t*)calloc(1,sizeof(*dvdnav_priv))))
+ if (!(dvdnav_priv=calloc(1,sizeof(*dvdnav_priv))))
return NULL;
if (!(dvdnav_priv->filename=strdup(filename))) {
@@ -166,7 +166,7 @@ void dvdnav_stream_add_event(dvdnav_priv_t* dvdnav_priv, int event, unsigned cha
if (!dvdnav_priv->started) return;
- if (!(dvdnav_event=(dvdnav_event_t*)calloc(1,sizeof(*dvdnav_event)))) {
+ if (!(dvdnav_event=calloc(1,sizeof(*dvdnav_event)))) {
mp_msg(MSGT_OPEN,MSGL_V, "%s: dvdnav_event: out of memory!\n",__FUNCTION__);
return;
}
@@ -175,7 +175,7 @@ void dvdnav_stream_add_event(dvdnav_priv_t* dvdnav_priv, int event, unsigned cha
memcpy(dvdnav_event->details,buf,len);
dvdnav_event->len=len;
- if (!(cmd = (mp_cmd_t*)calloc(1,sizeof(*cmd)))) {
+ if (!(cmd = calloc(1,sizeof(*cmd)))) {
mp_msg(MSGT_OPEN,MSGL_V, "%s: mp_cmd_t: out of memory!\n",__FUNCTION__);
free(dvdnav_event->details);
free(dvdnav_event);
diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c
index 903b1d9e67..1083561079 100644
--- a/libmpdemux/tvi_v4l.c
+++ b/libmpdemux/tvi_v4l.c
@@ -568,7 +568,7 @@ static int init(priv_t *priv)
}
mp_msg(MSGT_TV, MSGL_INFO, " Inputs: %d\n", priv->capability.channels);
- priv->channels = (struct video_channel *)calloc(priv->capability.channels, sizeof(struct video_channel));
+ priv->channels = calloc(priv->capability.channels, sizeof(struct video_channel));
if (!priv->channels)
goto malloc_failed;
memset(priv->channels, 0, sizeof(struct video_channel)*priv->capability.channels);
@@ -621,7 +621,7 @@ static int init(priv_t *priv)
priv->nbuf = priv->mbuf.frames;
/* video buffers */
- priv->buf = (struct video_mmap *)calloc(priv->nbuf, sizeof(struct video_mmap));
+ priv->buf = calloc(priv->nbuf, sizeof(struct video_mmap));
if (!priv->buf)
goto malloc_failed;
memset(priv->buf, 0, priv->nbuf * sizeof(struct video_mmap));
@@ -856,13 +856,13 @@ static int start(priv_t *priv)
if (!tv_param_noaudio) {
setup_audio_buffer_sizes(priv);
bytes_per_sample = priv->audio_in.bytes_per_sample;
- priv->audio_skew_buffer = (long long*)calloc(priv->aud_skew_cnt, sizeof(long long));
+ priv->audio_skew_buffer = calloc(priv->aud_skew_cnt, sizeof(long long));
if (!priv->audio_skew_buffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate skew buffer: %s\n", strerror(errno));
return 0;
}
- priv->audio_ringbuffer = (unsigned char*)calloc(priv->audio_in.blocksize, priv->audio_buffer_size);
+ priv->audio_ringbuffer = calloc(priv->audio_in.blocksize, priv->audio_buffer_size);
if (!priv->audio_ringbuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate audio buffer: %s\n", strerror(errno));
return 0;
@@ -900,7 +900,7 @@ static int start(priv_t *priv)
priv->video_buffer_size_max,
priv->video_buffer_size_max*priv->height*priv->bytesperline/(1024*1024));
- priv->video_ringbuffer = (unsigned char**)calloc(priv->video_buffer_size_max, sizeof(unsigned char*));
+ priv->video_ringbuffer = calloc(priv->video_buffer_size_max, sizeof(unsigned char*));
if (!priv->video_ringbuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate video buffer: %s\n", strerror(errno));
return 0;
@@ -908,12 +908,12 @@ static int start(priv_t *priv)
for (i = 0; i < priv->video_buffer_size_max; i++)
priv->video_ringbuffer[i] = NULL;
- priv->video_timebuffer = (long long*)calloc(priv->video_buffer_size_max, sizeof(long long));
+ priv->video_timebuffer = calloc(priv->video_buffer_size_max, sizeof(long long));
if (!priv->video_timebuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate time buffer: %s\n", strerror(errno));
return 0;
}
- priv->video_avg_buffer = (long long*)malloc(sizeof(long long) * VIDEO_AVG_BUFFER_SIZE);
+ priv->video_avg_buffer = malloc(sizeof(long long) * VIDEO_AVG_BUFFER_SIZE);
if (!priv->video_avg_buffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate period buffer: %s\n", strerror(errno));
return 0;
@@ -1569,7 +1569,7 @@ static void *video_grabber(void *data)
pthread_mutex_lock(&priv->video_buffer_mutex);
if (priv->video_buffer_size_current < priv->video_buffer_size_max) {
if (priv->video_cnt == priv->video_buffer_size_current) {
- unsigned char *newbuf = (unsigned char*)calloc(priv->bytesperline, priv->height);
+ unsigned char *newbuf = calloc(priv->bytesperline, priv->height);
if (newbuf) {
memmove(priv->video_ringbuffer+priv->video_tail+1, priv->video_ringbuffer+priv->video_tail,
(priv->video_buffer_size_current-priv->video_tail)*sizeof(unsigned char *));
diff --git a/libmpdemux/tvi_v4l2.c b/libmpdemux/tvi_v4l2.c
index 5385540f94..a91ca48bd2 100644
--- a/libmpdemux/tvi_v4l2.c
+++ b/libmpdemux/tvi_v4l2.c
@@ -1169,18 +1169,18 @@ static int start(priv_t *priv)
if (!tv_param_noaudio) {
setup_audio_buffer_sizes(priv);
- priv->audio_skew_buffer = (long long*)calloc(priv->aud_skew_cnt, sizeof(long long));
+ priv->audio_skew_buffer = calloc(priv->aud_skew_cnt, sizeof(long long));
if (!priv->audio_skew_buffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate skew buffer: %s\n", strerror(errno));
return 0;
}
- priv->audio_skew_delta_buffer = (long long*)calloc(priv->aud_skew_cnt, sizeof(long long));
+ priv->audio_skew_delta_buffer = calloc(priv->aud_skew_cnt, sizeof(long long));
if (!priv->audio_skew_delta_buffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate skew buffer: %s\n", strerror(errno));
return 0;
}
- priv->audio_ringbuffer = (unsigned char*)calloc(priv->audio_in.blocksize, priv->audio_buffer_size);
+ priv->audio_ringbuffer = calloc(priv->audio_in.blocksize, priv->audio_buffer_size);
if (!priv->audio_ringbuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate audio buffer: %s\n", strerror(errno));
return 0;
@@ -1226,14 +1226,14 @@ static int start(priv_t *priv)
priv->video_buffer_size_max*priv->format.fmt.pix.height*bytesperline/(1024*1024));
}
- priv->video_ringbuffer = (unsigned char**)calloc(priv->video_buffer_size_max, sizeof(unsigned char*));
+ priv->video_ringbuffer = calloc(priv->video_buffer_size_max, sizeof(unsigned char*));
if (!priv->video_ringbuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate video buffer: %s\n", strerror(errno));
return 0;
}
for (i = 0; i < priv->video_buffer_size_max; i++)
priv->video_ringbuffer[i] = NULL;
- priv->video_timebuffer = (long long*)calloc(priv->video_buffer_size_max, sizeof(long long));
+ priv->video_timebuffer = calloc(priv->video_buffer_size_max, sizeof(long long));
if (!priv->video_timebuffer) {
mp_msg(MSGT_TV, MSGL_ERR, "cannot allocate time buffer: %s\n", strerror(errno));
return 0;
@@ -1471,7 +1471,7 @@ static void *video_grabber(void *data)
pthread_mutex_lock(&priv->video_buffer_mutex);
if (priv->video_buffer_size_current < priv->video_buffer_size_max) {
if (priv->video_cnt == priv->video_buffer_size_current) {
- unsigned char *newbuf = (unsigned char*)malloc(framesize);
+ unsigned char *newbuf = malloc(framesize);
if (newbuf) {
memmove(priv->video_ringbuffer+priv->video_tail+1, priv->video_ringbuffer+priv->video_tail,
(priv->video_buffer_size_current-priv->video_tail)*sizeof(unsigned char *));
@@ -1561,7 +1561,7 @@ static int get_video_framesize(priv_t *priv)
// for testing purposes only
static void read_doublespeed(priv_t *priv)
{
- char *bufx = (char*)calloc(priv->audio_in.blocksize, 2);
+ char *bufx = calloc(priv->audio_in.blocksize, 2);
short *s;
short *d;
int i;