]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commit
Maintain pointer to end of AVFormatContext.packet_buffer list
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 6 Aug 2008 22:17:38 +0000 (22:17 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 6 Aug 2008 22:17:38 +0000 (22:17 +0000)
commit598fd2f94847eecd611df38d9c87b5964d86b910
tree58cdd73bbf2cfbd9db8f72d1c9b1e307ec062417
parente0fbc3e4c3fa12763d3137a50da249e341988b10
Maintain pointer to end of AVFormatContext.packet_buffer list

This changes add_to_pktbuf() to maintain a pointer to the last entry
in the list, avoiding a linear walk-through on each call.  Before this
change, add_to_pktbuf() could take a significant amount of time (10%
of total decoding time), even with input files of several minutes.
After the change, the time spent in this function is barely measurable
with oprofile.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14654 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
libavformat/avformat.h
libavformat/utils.c