summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/ass_mp.c3
-rw-r--r--sub/subreader.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index 0713248db0..88c55862f2 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -248,8 +248,7 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, int w, int h,
int hinting;
ass_set_frame_size(priv, w, h);
ass_set_margins(priv, opts->ass_top_margin, opts->ass_bottom_margin, 0, 0);
- ass_set_use_margins(priv, opts->ass_use_margins);
- ass_set_font_scale(priv, opts->ass_font_scale);
+ mp_ass_reload_options(priv, opts);
if (!unscaled && (opts->ass_hinting & 4))
hinting = 0;
else
diff --git a/sub/subreader.c b/sub/subreader.c
index f694f57a7c..ad4142d50a 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -1505,7 +1505,11 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts)
utf16--;
mpsub_multiplier = (uses_time ? 100.0 : 1.0);
- if (sub_format==SUB_INVALID) {mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");return NULL;}
+ if (sub_format==SUB_INVALID) {
+ mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");
+ free_stream(fd);
+ return NULL;
+ }
srp=sr+sub_format;
mp_msg(MSGT_SUBREADER, MSGL_V, "SUB: Detected subtitle file format: %s\n", srp->name);
@@ -1533,7 +1537,8 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts)
subcp_close();
sub_utf8=sub_utf8_prev;
#endif
- return NULL;
+ free_stream(fd);
+ return NULL;
}
#ifdef CONFIG_SORTSUB
@@ -1570,6 +1575,7 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts)
#endif
free(first);
free(alloced_sub);
+ free_stream(fd);
return NULL;
}
// Apply any post processing that needs recoding first