diff options
author | wm4 <wm4@nowhere> | 2013-07-14 17:59:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-14 17:59:26 +0200 |
commit | e18ffd6b998858ca0797cb0ce4aabd4a509655dd (patch) | |
tree | 199bddd30923db1175a1331191eb86ba684e9e41 /sub/dec_sub.c | |
parent | 3e7d483ac89289f613138002be2043ec5f479bb0 (diff) | |
parent | 5ead20bdb3328d199dad693039d18e7a05eb2465 (diff) | |
download | mpv-e18ffd6b998858ca0797cb0ce4aabd4a509655dd.tar.bz2 mpv-e18ffd6b998858ca0797cb0ce4aabd4a509655dd.tar.xz |
Merge branch 'remove_old_demuxers'
The merged branch doesn't actually just remove old demuxers, but also
includes a branch of cleanups and some refactoring.
Conflicts:
stream/stream.c
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r-- | sub/dec_sub.c | 6 |
1 files changed, 4 insertions, 2 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); } } |