mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
Improve amortized worst case speed of the muxers packet interleaving code
from O(packets_in_the_file) to O(num_of_streams). Originally committed as revision 19887 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d25130eb23
commit
e07b882b4d
4 changed files with 34 additions and 14 deletions
|
|
@ -261,6 +261,12 @@ static int ogg_interleave_per_granule(AVFormatContext *s, AVPacket *out, AVPacke
|
|||
OGGStreamContext *ogg = s->streams[out->stream_index]->priv_data;
|
||||
ogg->eos = 1;
|
||||
}
|
||||
if(!s->packet_buffer)
|
||||
s->packet_buffer_end= NULL;
|
||||
|
||||
if(s->streams[out->stream_index]->last_in_packet_buffer == pktl)
|
||||
s->streams[out->stream_index]->last_in_packet_buffer= NULL;
|
||||
|
||||
av_freep(&pktl);
|
||||
return 1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue