summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/dec_sub.c6
-rw-r--r--sub/osd_libass.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 5fb8722296..4351cf60a0 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
+#include <math.h>
#include <assert.h>
#include "config.h"
@@ -379,12 +380,12 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh)
preprocess = 1;
for (;;) {
- ds_get_next_pts(sh->ds);
- struct demux_packet *pkt = ds_get_packet_sub(sh->ds);
+ struct demux_packet *pkt = demux_read_packet(sh->gsh);
if (!pkt)
break;
if (preprocess) {
decode_chain(sub->sd, preprocess, pkt);
+ talloc_free(pkt);
while (1) {
pkt = get_decoded_packet(sub->sd[preprocess - 1]);
if (!pkt)
@@ -393,6 +394,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh)
}
} else {
add_packet(subs, pkt);
+ talloc_free(pkt);
}
}
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index cbf9466780..fc4592ef99 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -34,7 +34,7 @@ static const char osd_font_pfb[] =
;
#include "sub/ass_mp.h"
-#include "core/mp_core.h"
+#include "core/options.h"
// NOTE: \fs-5 to reduce the size of the symbols in relation to normal text.