aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtmppkt.h
diff options
context:
space:
mode:
authorMartin Panter <vadmium@gmail.com>2014-03-05 04:04:39 +0000
committerMartin Storsjö <martin@martin.st>2014-03-07 10:43:26 +0200
commit5b2ad78f97d43299adcb038c04346999fe9b196c (patch)
treeac48a732149d21f3ea0d071b414e4010aba9a921 /libavformat/rtmppkt.h
parent93d216d37a3f95190ecb9d51cf72f54ea4e04ec7 (diff)
downloadffmpeg-5b2ad78f97d43299adcb038c04346999fe9b196c.tar.gz
rtmppkt: Handle extended timestamp field even for one-byte header
Related fix in "rtmpdump": https://repo.or.cz/w/rtmpdump.git/commitdiff/79459a2 Adobe's RTMP specification (21 Dec 2012), section 5.3.1.3 ("Extended Timestamp"), says "this field is present in Type 3 chunks". Type 3 chunks are those with the one-byte header size. This resolves intermittent hangs and segfaults caused by the read function, and also includes an untested fix for the write function. The read function was tested with ABC (Australia) News 24 streams, however they are probably restricted to only Australian internet addresses. Some of the packets at the start of these streams seem to contain junk timestamp fields, often requiring the extended field. Test command: avplay rtmp://cp81899.live.edgefcs.net/live/news24-med@28772 Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtmppkt.h')
-rw-r--r--libavformat/rtmppkt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h
index 7121d7e268..3ccc6b4110 100644
--- a/libavformat/rtmppkt.h
+++ b/libavformat/rtmppkt.h
@@ -78,7 +78,7 @@ typedef struct RTMPPacket {
int channel_id; ///< RTMP channel ID (nothing to do with audio/video channels though)
RTMPPacketType type; ///< packet payload type
uint32_t timestamp; ///< packet full timestamp
- uint32_t ts_delta; ///< timestamp increment to the previous one in milliseconds (latter only for media packets)
+ uint32_t ts_delta; ///< 24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets). Clipped to a maximum of 0xFFFFFF, indicating an extended timestamp field.
uint32_t extra; ///< probably an additional channel ID used during streaming data
uint8_t *data; ///< packet payload
int size; ///< packet payload size