diff options
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/muxer.c | 2 | ||||
-rw-r--r-- | libmpdemux/stream_dvd.c | 2 | ||||
-rw-r--r-- | libmpdemux/tv.c | 2 | ||||
-rw-r--r-- | libmpdemux/yuv4mpeg.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c index c59d3b1467..066443fefd 100644 --- a/libmpdemux/muxer.c +++ b/libmpdemux/muxer.c @@ -82,7 +82,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double buf->pts= pts; buf->len = len; buf->flags = flags; - buf->buffer = malloc(len * sizeof (unsigned char)); + buf->buffer = malloc(len); if (!buf->buffer) { mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr); return; diff --git a/libmpdemux/stream_dvd.c b/libmpdemux/stream_dvd.c index 4d0a4cc3c2..341f706ef9 100644 --- a/libmpdemux/stream_dvd.c +++ b/libmpdemux/stream_dvd.c @@ -518,7 +518,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { /* Dynamic DVD drive selection on Darwin */ if(!strcmp(dvd_device, "/dev/rdiskN")) { int i; - char *temp_device = malloc((strlen(dvd_device)+1)*sizeof(char)); + char *temp_device = malloc(strlen(dvd_device)+1); for (i = 1; i < 10; i++) { sprintf(temp_device, "/dev/rdisk%d", i); diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index 87f95a9dca..3939ab11f5 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -375,7 +375,7 @@ static int open_tv(tvi_handle_t *tvh) tv_channel_current->prev->next = NULL; free(tv_channel_current); } else - tv_channel_last_real = malloc(sizeof(char)*5); + tv_channel_last_real = malloc(5); if (tv_channel_list) { int i; diff --git a/libmpdemux/yuv4mpeg.c b/libmpdemux/yuv4mpeg.c index f746da21c2..e22cc11de8 100644 --- a/libmpdemux/yuv4mpeg.c +++ b/libmpdemux/yuv4mpeg.c @@ -103,7 +103,7 @@ ssize_t y4m_write(int fd, char *buf, size_t len) static char *y4m_new_xtag(void) { - return _y4m_alloc(Y4M_MAX_XTAG_SIZE * sizeof(char)); + return _y4m_alloc(Y4M_MAX_XTAG_SIZE); } |