diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index 4f79487ee0..c474fb3d58 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -387,6 +387,13 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, if ((ret = ffurl_write(h, &marker, 1)) < 0) return ret; written++; + if (pkt->ts_field == 0xFFFFFF) { + uint8_t ts_header[4]; + AV_WB32(ts_header, timestamp); + if ((ret = ffurl_write(h, ts_header, 4)) < 0) + return ret; + written += 4; + } } } return written;