Lines Matching refs:ass
48 ASSContext *ass = s->priv_data; in write_header() local
67 ass->trailer_size = par->extradata_size - header_size; in write_header()
68 if (ass->trailer_size) in write_header()
69 ass->trailer = trailer; in write_header()
75 ass->ssa_mode = !strstr(par->extradata, "\n[V4+ Styles]"); in write_header()
78 ass->ssa_mode ? "Marked" : "Layer"); in write_header()
87 ASSContext *ass = s->priv_data; in purge_dialogues() local
88 DialogueLine *dialogue = ass->dialogue_cache; in purge_dialogues()
90 while (dialogue && (dialogue->readorder == ass->expected_readorder || force)) { in purge_dialogues()
92 if (dialogue->readorder != ass->expected_readorder) { in purge_dialogues()
94 ass->expected_readorder, dialogue->readorder); in purge_dialogues()
95 ass->expected_readorder = dialogue->readorder; in purge_dialogues()
98 if (dialogue == ass->last_added_dialogue) in purge_dialogues()
99 ass->last_added_dialogue = next; in purge_dialogues()
104 dialogue = ass->dialogue_cache = next; in purge_dialogues()
105 ass->expected_readorder++; in purge_dialogues()
108 ass->cache_size -= n; in purge_dialogues()
111 n, ass->cache_size, ass->expected_readorder); in purge_dialogues()
114 static void insert_dialogue(ASSContext *ass, DialogueLine *dialogue) in insert_dialogue() argument
119 if (ass->last_added_dialogue) { in insert_dialogue()
120 for (cur = ass->last_added_dialogue; cur; cur = cur->next) { in insert_dialogue()
130 next = ass->dialogue_cache; in insert_dialogue()
131 for (cur = next; cur != ass->last_added_dialogue; cur = cur->next) { in insert_dialogue()
143 dialogue->prev = ass->dialogue_cache; in insert_dialogue()
144 ass->dialogue_cache = dialogue; in insert_dialogue()
150 ass->cache_size++; in insert_dialogue()
151 ass->last_added_dialogue = dialogue; in insert_dialogue()
156 ASSContext *ass = s->priv_data; in write_packet() local
170 if (dialogue->readorder < ass->expected_readorder) in write_packet()
176 if (ass->ssa_mode && !strncmp(p, "Marked=", 7)) in write_packet()
190 ass->ssa_mode ? "Marked=" : "", in write_packet()
196 insert_dialogue(ass, dialogue); in write_packet()
197 purge_dialogues(s, ass->ignore_readorder); in write_packet()
204 ASSContext *ass = s->priv_data; in write_trailer() local
208 if (ass->trailer) { in write_trailer()
209 avio_write(s->pb, ass->trailer, ass->trailer_size); in write_trailer()