Merge commit '89564be444d24f75ea5add8b6987e414cf7aa7d5'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jan 2014 03:20:47 +0000 (04:20 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jan 2014 03:20:50 +0000 (04:20 +0100)
* commit '89564be444d24f75ea5add8b6987e414cf7aa7d5':
  rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtmppkt.c

index 375ae2fcb139d226a04ca5995e4c5650e5c90e80..f99540cd5103b8765f8afe3522038dd5b73c8d1f 100644 (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;