summaryrefslogtreecommitdiff
path: root/libavformat/seek.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-04 15:49:26 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-05 18:47:05 +0100
commit27c7ca9c12bb42d5c44d46f24cd970469d0ef55a (patch)
tree919bcdcd0a17451b2d79edc121a4c05f57ffe86e /libavformat/seek.h
parentdcee811505b9f95edad73526d94cabc99331b659 (diff)
lavf: deobfuscate read_frame_internal().
Split off packet parsing into a separate function. Parse full packets at once and store them in a queue, eliminating the need for tracking parsing state in AVStream. The horrible unreadable loop in read_frame_internal() now isn't weirdly ordered and doesn't contain evil gotos, so it should be much easier to understand. compute_pkt_fields() now invents slightly different timestamps for two raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't be more wrong (or right) than previous ones.
Diffstat (limited to 'libavformat/seek.h')
-rw-r--r--libavformat/seek.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/seek.h b/libavformat/seek.h
index fd95f497d6..e79d7bd69e 100644
--- a/libavformat/seek.h
+++ b/libavformat/seek.h
@@ -31,12 +31,9 @@
typedef struct AVParserStreamState {
// saved members of AVStream
AVCodecParserContext *parser;
- AVPacket cur_pkt;
int64_t last_IP_pts;
int64_t cur_dts;
int64_t reference_dts;
- const uint8_t *cur_ptr;
- int cur_len;
int probe_packets;
} AVParserStreamState;
@@ -47,8 +44,8 @@ typedef struct AVParserState {
int64_t fpos; ///< file position at the time of call
// saved members of AVFormatContext
- AVStream *cur_st; ///< current stream.
AVPacketList *packet_buffer; ///< packet buffer of original state
+ AVPacketList *parse_queue; ///< parse queue of original state
AVPacketList *raw_packet_buffer; ///< raw packet buffer of original state
int raw_packet_buffer_remaining_size; ///< remaining space in raw_packet_buffer