summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-13 22:11:47 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-13 22:11:47 +0000
commit26f0e5e4a1e9cf0b38fbcd25ab1facb8b3f22744 (patch)
treea83a82a6ab5a1b73534e689e88353f314b5258fe /libmpdemux
parent74b35b3fc7b80c1f0be09b90a892b928b9764040 (diff)
downloadmpv-26f0e5e4a1e9cf0b38fbcd25ab1facb8b3f22744.tar.bz2
mpv-26f0e5e4a1e9cf0b38fbcd25ab1facb8b3f22744.tar.xz
more sizeof(char) fun
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19075 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/realrtsp/real.c2
-rw-r--r--libmpdemux/realrtsp/rmff.c16
-rw-r--r--libmpdemux/realrtsp/sdpplin.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/libmpdemux/realrtsp/real.c b/libmpdemux/realrtsp/real.c
index af692f6862..3a6683a0aa 100644
--- a/libmpdemux/realrtsp/real.c
+++ b/libmpdemux/realrtsp/real.c
@@ -767,7 +767,7 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwid
printf("real: Stream description size: %u\n", size);
#endif
- description=malloc(sizeof(char)*(size+1));
+ description=malloc((size+1));
if( rtsp_read_data(rtsp_session, description, size) <= 0) {
buf = xbuffer_free(buf);
diff --git a/libmpdemux/realrtsp/rmff.c b/libmpdemux/realrtsp/rmff.c
index 0a5d65f984..540cb4c3bc 100644
--- a/libmpdemux/realrtsp/rmff.c
+++ b/libmpdemux/realrtsp/rmff.c
@@ -352,17 +352,17 @@ static rmff_mdpr_t *rmff_scan_mdpr(const char *data) {
mdpr->duration=BE_32(&data[36]);
mdpr->stream_name_size=data[40];
- mdpr->stream_name=malloc(sizeof(char)*(mdpr->stream_name_size+1));
+ mdpr->stream_name=malloc((mdpr->stream_name_size+1));
memcpy(mdpr->stream_name, &data[41], mdpr->stream_name_size);
mdpr->stream_name[mdpr->stream_name_size]=0;
mdpr->mime_type_size=data[41+mdpr->stream_name_size];
- mdpr->mime_type=malloc(sizeof(char)*(mdpr->mime_type_size+1));
+ mdpr->mime_type=malloc((mdpr->mime_type_size+1));
memcpy(mdpr->mime_type, &data[42+mdpr->stream_name_size], mdpr->mime_type_size);
mdpr->mime_type[mdpr->mime_type_size]=0;
mdpr->type_specific_len=BE_32(&data[42+mdpr->stream_name_size+mdpr->mime_type_size]);
- mdpr->type_specific_data=malloc(sizeof(char)*(mdpr->type_specific_len));
+ mdpr->type_specific_data=malloc((mdpr->type_specific_len));
memcpy(mdpr->type_specific_data,
&data[46+mdpr->stream_name_size+mdpr->mime_type_size], mdpr->type_specific_len);
@@ -383,22 +383,22 @@ static rmff_cont_t *rmff_scan_cont(const char *data) {
cont->object_version);
}
cont->title_len=BE_16(&data[10]);
- cont->title=malloc(sizeof(char)*(cont->title_len+1));
+ cont->title=malloc((cont->title_len+1));
memcpy(cont->title, &data[12], cont->title_len);
cont->title[cont->title_len]=0;
pos=cont->title_len+12;
cont->author_len=BE_16(&data[pos]);
- cont->author=malloc(sizeof(char)*(cont->author_len+1));
+ cont->author=malloc((cont->author_len+1));
memcpy(cont->author, &data[pos+2], cont->author_len);
cont->author[cont->author_len]=0;
pos=pos+2+cont->author_len;
cont->copyright_len=BE_16(&data[pos]);
- cont->copyright=malloc(sizeof(char)*(cont->copyright_len+1));
+ cont->copyright=malloc((cont->copyright_len+1));
memcpy(cont->copyright, &data[pos+2], cont->copyright_len);
cont->copyright[cont->copyright_len]=0;
pos=pos+2+cont->copyright_len;
cont->comment_len=BE_16(&data[pos]);
- cont->comment=malloc(sizeof(char)*(cont->comment_len+1));
+ cont->comment=malloc((cont->comment_len+1));
memcpy(cont->comment, &data[pos+2], cont->comment_len);
cont->comment[cont->comment_len]=0;
@@ -626,7 +626,7 @@ rmff_mdpr_t *rmff_new_mdpr(
mdpr->mime_type_size=strlen(mime_type);
}
mdpr->type_specific_len=type_specific_len;
- mdpr->type_specific_data=malloc(sizeof(char)*type_specific_len);
+ mdpr->type_specific_data=malloc(type_specific_len);
memcpy(mdpr->type_specific_data,type_specific_data,type_specific_len);
mdpr->mlti_data=NULL;
diff --git a/libmpdemux/realrtsp/sdpplin.c b/libmpdemux/realrtsp/sdpplin.c
index 34e5925d60..80ba62bae1 100644
--- a/libmpdemux/realrtsp/sdpplin.c
+++ b/libmpdemux/realrtsp/sdpplin.c
@@ -203,7 +203,7 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
if(filter(*data,"a=OpaqueData:buffer;",&buf)) {
decoded = b64_decode(buf, decoded, &(desc->mlti_data_size));
- desc->mlti_data=malloc(sizeof(char)*desc->mlti_data_size);
+ desc->mlti_data=malloc(desc->mlti_data_size);
memcpy(desc->mlti_data, decoded, desc->mlti_data_size);
handled=1;
*data=nl(*data);