Get rid of a few more useless malloc casts

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23828 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-07-19 17:15:56 +00:00
parent d7f314b0a9
commit daa6cb6cab
1 changed files with 6 additions and 6 deletions

View File

@ -493,12 +493,12 @@ char *get_metadata (metadata_t type) {
meta = strdup ("h264");
else if (sh_video->format >= 0x20202020)
{
meta = (char *) malloc (8);
meta = malloc (8);
sprintf (meta, "%.4s", (char *) &sh_video->format);
}
else
{
meta = (char *) malloc (8);
meta = malloc (8);
sprintf (meta, "0x%08X", sh_video->format);
}
return meta;
@ -506,14 +506,14 @@ char *get_metadata (metadata_t type) {
case META_VIDEO_BITRATE:
{
meta = (char *) malloc (16);
meta = malloc (16);
sprintf (meta, "%d kbps", (int) (sh_video->i_bps * 8 / 1024));
return meta;
}
case META_VIDEO_RESOLUTION:
{
meta = (char *) malloc (16);
meta = malloc (16);
sprintf (meta, "%d x %d", sh_video->disp_w, sh_video->disp_h);
return meta;
}
@ -527,14 +527,14 @@ char *get_metadata (metadata_t type) {
case META_AUDIO_BITRATE:
{
meta = (char *) malloc (16);
meta = malloc (16);
sprintf (meta, "%d kbps", (int) (sh_audio->i_bps * 8/1000));
return meta;
}
case META_AUDIO_SAMPLES:
{
meta = (char *) malloc (16);
meta = malloc (16);
sprintf (meta, "%d Hz, %d ch.", sh_audio->samplerate, sh_audio->channels);
return meta;
}