From 8612c771fcb7321a2d6e0ba79f6f3cf26ee7f70c Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 19 Jan 2011 18:00:22 +0200 Subject: cleanup: some random minor code simplification and cleanup --- mplayer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 1c41e35f9d..00d568b359 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1093,9 +1093,8 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr sub_data *subd = NULL; struct ass_track *asst = NULL; - if (filename == NULL || mpctx->set_of_sub_size >= MAX_SUBTITLE_FILES) { + if (filename == NULL || mpctx->set_of_sub_size >= MAX_SUBTITLE_FILES) return; - } #ifdef CONFIG_ASS if (opts->ass_enabled) { @@ -1108,10 +1107,8 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr subd = sub_read_file(filename, fps, &mpctx->opts); if (subd) { asst = ass_read_subdata(ass_library, subd, fps); - if (asst) { - sub_free(subd); - subd = NULL; - } + sub_free(subd); + subd = NULL; } } } else -- cgit v1.2.3