| 7007 | } |
| 7008 | |
| 7009 | void hb_chapter_enqueue(hb_chapter_queue_t *q, hb_buffer_t *buf) |
| 7010 | { |
| 7011 | /* |
| 7012 | * Chapter markers are sometimes so close we can get a new |
| 7013 | * one before the previous goes through the encoding queue. |
| 7014 | * |
| 7015 | * Dropping markers can cause weird side-effects downstream, |
| 7016 | * including but not limited to missing chapters in the |
| 7017 | * output, so we need to save it somehow. |
| 7018 | */ |
| 7019 | hb_chapter_queue_item_t *item = malloc(sizeof(hb_chapter_queue_item_t)); |
| 7020 | if (item != NULL) |
| 7021 | { |
| 7022 | item->start = buf->s.start; |
| 7023 | item->new_chap = buf->s.new_chap; |
| 7024 | // Make sure work_loop doesn't also copy the chapter mark |
| 7025 | buf->s.new_chap = 0; |
| 7026 | hb_list_add(q->list_chapter, item); |
| 7027 | } |
| 7028 | } |
| 7029 | |
| 7030 | void hb_chapter_dequeue(hb_chapter_queue_t *q, hb_buffer_t *buf) |
| 7031 | { |
no test coverage detected