1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Martin Storsjö 2014-01-17 14:30:57 +02:00
parent 24eb3c7916
commit 89564be444

View File

@ -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;