Mercurial > libavformat.hg
comparison oggenc.c @ 5210:36d130853c9b libavformat
Improve amortized worst case speed of the muxers packet interleaving code
from O(packets_in_the_file) to O(num_of_streams).
author | michael |
---|---|
date | Wed, 16 Sep 2009 20:04:04 +0000 |
parents | f67fad61077e |
children | 4292c6f121dc |
comparison
equal
deleted
inserted
replaced
5209:2b52ec1e8619 | 5210:36d130853c9b |
---|---|
259 s->packet_buffer = pktl->next; | 259 s->packet_buffer = pktl->next; |
260 if (flush && streams[out->stream_index] == 1) { | 260 if (flush && streams[out->stream_index] == 1) { |
261 OGGStreamContext *ogg = s->streams[out->stream_index]->priv_data; | 261 OGGStreamContext *ogg = s->streams[out->stream_index]->priv_data; |
262 ogg->eos = 1; | 262 ogg->eos = 1; |
263 } | 263 } |
264 if(!s->packet_buffer) | |
265 s->packet_buffer_end= NULL; | |
266 | |
267 if(s->streams[out->stream_index]->last_in_packet_buffer == pktl) | |
268 s->streams[out->stream_index]->last_in_packet_buffer= NULL; | |
269 | |
264 av_freep(&pktl); | 270 av_freep(&pktl); |
265 return 1; | 271 return 1; |
266 } else { | 272 } else { |
267 av_init_packet(out); | 273 av_init_packet(out); |
268 return 0; | 274 return 0; |