[MPlayer-cvslog] r26117 - in trunk/libmpdemux: demux_mkv.c demuxer.c
eugeni
subversion at mplayerhq.hu
Fri Feb 29 18:25:41 CET 2008
Author: eugeni
Date: Fri Feb 29 18:25:41 2008
New Revision: 26117
Log:
Remove stupid checks of free() argument.
Modified:
trunk/libmpdemux/demux_mkv.c
trunk/libmpdemux/demuxer.c
Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c (original)
+++ trunk/libmpdemux/demux_mkv.c Fri Feb 29 18:25:41 2008
@@ -927,18 +927,12 @@ demux_mkv_read_trackvideo (demuxer_t *de
*/
static void
demux_mkv_free_trackentry(mkv_track_t *track) {
- if (track->name)
- free (track->name);
- if (track->codec_id)
- free (track->codec_id);
- if (track->language)
- free (track->language);
- if (track->private_data)
- free (track->private_data);
- if (track->audio_buf)
- free (track->audio_buf);
- if (track->audio_timestamp)
- free (track->audio_timestamp);
+ free (track->name);
+ free (track->codec_id);
+ free (track->language);
+ free (track->private_data);
+ free (track->audio_buf);
+ free (track->audio_timestamp);
demux_mkv_free_encodings(track->encodings, track->num_encodings);
free(track);
}
@@ -2545,14 +2539,10 @@ demux_close_mkv (demuxer_t *demuxer)
demux_mkv_free_trackentry(mkv_d->tracks[i]);
free (mkv_d->tracks);
}
- if (mkv_d->indexes)
- free (mkv_d->indexes);
- if (mkv_d->cluster_positions)
- free (mkv_d->cluster_positions);
- if (mkv_d->parsed_cues)
- free (mkv_d->parsed_cues);
- if (mkv_d->parsed_seekhead)
- free (mkv_d->parsed_seekhead);
+ free (mkv_d->indexes);
+ free (mkv_d->cluster_positions);
+ free (mkv_d->parsed_cues);
+ free (mkv_d->parsed_seekhead);
free (mkv_d);
}
}
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c (original)
+++ trunk/libmpdemux/demuxer.c Fri Feb 29 18:25:41 2008
@@ -251,7 +251,7 @@ sh_sub_t *new_sh_sub_sid(demuxer_t *demu
void free_sh_sub(sh_sub_t *sh) {
mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUXER: freeing sh_sub at %p\n", sh);
- if (sh->extradata) free(sh->extradata);
+ free(sh->extradata);
#ifdef USE_ASS
if (sh->ass_track) ass_free_track(sh->ass_track);
#endif
@@ -288,8 +288,8 @@ void free_sh_audio(demuxer_t *demuxer, i
sh_audio_t *sh = demuxer->a_streams[id];
demuxer->a_streams[id] = NULL;
mp_msg(MSGT_DEMUXER,MSGL_DBG2,"DEMUXER: freeing sh_audio at %p\n",sh);
- if(sh->wf) free(sh->wf);
- if(sh->codecdata) free(sh->codecdata);
+ free(sh->wf);
+ free(sh->codecdata);
free(sh->lang);
free(sh);
}
@@ -314,7 +314,7 @@ sh_video_t* new_sh_video_vid(demuxer_t *
void free_sh_video(sh_video_t* sh){
mp_msg(MSGT_DEMUXER,MSGL_DBG2,"DEMUXER: freeing sh_video at %p\n",sh);
- if(sh->bih) free(sh->bih);
+ free(sh->bih);
free(sh);
}
@@ -343,12 +343,10 @@ skip_streamfree:
free(demuxer->info[i]);
free(demuxer->info);
}
- if(demuxer->filename)
- free(demuxer->filename);
+ free(demuxer->filename);
if (demuxer->chapters) {
for (i=0; i<demuxer->num_chapters; i++)
- if (demuxer->chapters[i].name)
- free(demuxer->chapters[i].name);
+ free(demuxer->chapters[i].name);
free(demuxer->chapters);
}
if (demuxer->attachments) {
More information about the MPlayer-cvslog
mailing list