diff options
author | Måns Rullgård <mans@mansr.com> | 2008-08-06 22:17:38 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-08-06 22:17:38 +0000 |
commit | 5c5b1731b77c6988debf975a5fd0a91936df013b (patch) | |
tree | 815be7b7833a50d3a0447d6b1f90fda897bd2be2 /libavformat/avformat.h | |
parent | b888abe1be9f0b3c75273c28e9a7b58fe47d5ec4 (diff) | |
download | ffmpeg-5c5b1731b77c6988debf975a5fd0a91936df013b.tar.gz |
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.
Originally committed as revision 14654 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index c6586862e9..8479d6720f 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -22,7 +22,7 @@ #define FFMPEG_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 18 +#define LIBAVFORMAT_VERSION_MINOR 19 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -565,6 +565,9 @@ typedef struct AVFormatContext { * codec. */ struct AVPacketList *raw_packet_buffer; + struct AVPacketList *raw_packet_buffer_end; + + struct AVPacketList *packet_buffer_end; } AVFormatContext; typedef struct AVPacketList { |