diff options
author | Josh Allmann <joshua.allmann@gmail.com> | 2013-09-16 23:58:48 -0700 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-17 23:19:11 +0300 |
commit | 8583b14252deac71136f1dec231910abab0ba503 (patch) | |
tree | 168eed6f41d80315d484ab8257a606b0eeb5daba /libavformat/rtmppkt.h | |
parent | d4c2a3740fb95f952a87ba320d2bf31f126bdf68 (diff) | |
download | ffmpeg-8583b14252deac71136f1dec231910abab0ba503.tar.gz |
rtmp: Support reading interleaved chunks.
A given packet won't always come in contiguously; sometimes
they may be broken up on chunk boundaries by packets of another
channel.
This support primarily involves tracking information about the
data that's been read, so the reader can pick up where it left
off for a given channel.
As a side effect, we no longer over-report the bytes read if
(toread = MIN(size, chunk_size)) == size
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtmppkt.h')
-rw-r--r-- | libavformat/rtmppkt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index e3120becc9..ce326d15db 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -82,6 +82,8 @@ typedef struct RTMPPacket { uint32_t extra; ///< probably an additional channel ID used during streaming data uint8_t *data; ///< packet payload int size; ///< packet payload size + int offset; ///< amount of data read so far + int read; ///< amount read, including headers } RTMPPacket; /** |