[MPlayer-cvslog] r32869 - trunk/sub/subreader.c
cboesch
subversion at mplayerhq.hu
Mon Feb 7 20:29:37 CET 2011
Author: cboesch
Date: Mon Feb 7 20:29:36 2011
New Revision: 32869
Log:
Simplify frees in load_vob_subtitle.
Modified:
trunk/sub/subreader.c
Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c Mon Feb 7 20:27:17 2011 (r32868)
+++ trunk/sub/subreader.c Mon Feb 7 20:29:36 2011 (r32869)
@@ -2161,10 +2161,8 @@ void load_vob_subtitle(const char *fname
if (!name)
return;
strcpy_strip_ext(name, fname);
- if (add_f(name, ifo, 0, spu)) {
- free(name);
- return;
- }
+ if (add_f(name, ifo, 0, spu))
+ goto out;
// Try looking at the dirs specified by sub-paths option
if (sub_paths) {
@@ -2172,6 +2170,7 @@ void load_vob_subtitle(const char *fname
for (i = 0; sub_paths[i]; i++) {
char *path, *psub;
+ int sub_found;
path = mp_path_join(fname, sub_paths[i]);
if (!path)
@@ -2182,11 +2181,10 @@ void load_vob_subtitle(const char *fname
if (!psub)
goto out;
- if (add_f(psub, ifo, 0, spu)) {
- free(psub);
- goto out;
- }
+ sub_found = add_f(psub, ifo, 0, spu);
free(psub);
+ if (sub_found)
+ goto out;
}
}
More information about the MPlayer-cvslog
mailing list