diff options
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r-- | sub/dec_sub.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c index fb7e5e4a2a..4351cf60a0 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -380,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) @@ -394,6 +394,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh) } } else { add_packet(subs, pkt); + talloc_free(pkt); } } |