Commit 89564be4 authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent 24eb3c79
...@@ -313,7 +313,8 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, ...@@ -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 channel_id = 0, this is first presentation of prev_pkt, send full hdr.
if (prev_pkt[pkt->channel_id].channel_id && 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 && if (pkt->type == prev_pkt[pkt->channel_id].type &&
pkt->size == prev_pkt[pkt->channel_id].size) { pkt->size == prev_pkt[pkt->channel_id].size) {
mode = RTMP_PS_FOURBYTES; mode = RTMP_PS_FOURBYTES;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment