diff options
author | Martin Storsjö <martin@martin.st> | 2014-01-17 14:30:57 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-01-20 21:57:02 +0200 |
commit | 89564be444d24f75ea5add8b6987e414cf7aa7d5 (patch) | |
tree | 354f4496978254896610384678ca96bfac8bb1a6 /libavformat | |
parent | 24eb3c791606fe98a1591c13a8b2ba6c342bb3b5 (diff) | |
download | ffmpeg-89564be444d24f75ea5add8b6987e414cf7aa7d5.tar.gz |
rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing
The normal differential timestamps can't handle negative
differences, thus send a full packet header with an absolute
timestamp in these cases.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtmppkt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index f58f668b53..81621b1a99 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -313,7 +313,8 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, //if channel_id = 0, this is first presentation of prev_pkt, send full hdr. if (prev_pkt[pkt->channel_id].channel_id && - pkt->extra == prev_pkt[pkt->channel_id].extra) { + pkt->extra == prev_pkt[pkt->channel_id].extra && + pkt->timestamp >= prev_pkt[pkt->channel_id].timestamp) { if (pkt->type == prev_pkt[pkt->channel_id].type && pkt->size == prev_pkt[pkt->channel_id].size) { mode = RTMP_PS_FOURBYTES; |