mark = 0;
if(SCT_ISAUDIO(pkt->pkt_type)) {
while ((opkt = pktref_first(&mk->holdq)) != NULL) {
- if (pts_diff(opkt->pkt_pts, pkt->pkt_pts) > 90000)
+ if (pts_diff(pkt->pkt_pts, opkt->pkt_pts) > 90000)
break;
opkt = pktref_get_first(&mk->holdq);
- tvhtrace(LS_MKV, "hold push, pts %"PRId64"\n", opkt->pkt_pts);
+ tvhtrace(LS_MKV, "hold push, pts %"PRId64", audio pts %"PRId64"\n", opkt->pkt_pts, pkt->pkt_pts);
tpkt = pkt_copy_shallow(opkt);
pkt_ref_dec(opkt);
tpkt->pkt_pcr = tpkt->pkt_pts;
mk_muxer_t *mk = (mk_muxer_t*)m;
mk_chapter_t *ch;
+ pktref_clear_queue(&mk->holdq);
+
while((ch = TAILQ_FIRST(&mk->chapters)) != NULL) {
TAILQ_REMOVE(&mk->chapters, ch, link);
free(ch);
void pktref_remove(struct th_pktref_queue *q, th_pktref_t *pr);
-static inline th_pkt_t *pktref_first(struct th_pktref_queue *q)
- { return (th_pkt_t *)TAILQ_FIRST(q); }
+th_pkt_t *pktref_first(struct th_pktref_queue *q);
th_pkt_t *pktref_get_first(struct th_pktref_queue *q);