diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-07 14:09:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-07 14:09:35 +0100 |
commit | 4fc339faea114873125b2bef1a8412059ab0e850 (patch) | |
tree | f0a1e95a4e82010f0bac4d7725214c3406d560ec | |
parent | 9baef60ae4004c06e839cf1d4d6a5b225bb7d5d1 (diff) | |
parent | 77eed91fab9b29426722f424fc39c109a8fa5b11 (diff) | |
download | ffmpeg-4fc339faea114873125b2bef1a8412059ab0e850.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rtmppkt: Rename the ts_delta field to ts_field
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rtmppkt.c | 20 | ||||
-rw-r--r-- | libavformat/rtmppkt.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index 2189183e7b..cbd09f23be 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -196,7 +196,7 @@ static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p, hdr >>= 6; // header size indicator if (hdr == RTMP_PS_ONEBYTE) { - ts_field = prev_pkt[channel_id].ts_delta; + ts_field = prev_pkt[channel_id].ts_field; } else { if (ffurl_read_complete(h, buf, 3) != 3) return AVERROR(EIO); @@ -235,7 +235,7 @@ static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p, return ret; p->read = written; p->offset = 0; - prev_pkt[channel_id].ts_delta = ts_field; + prev_pkt[channel_id].ts_field = ts_field; prev_pkt[channel_id].timestamp = timestamp; } else { // previous packet in this channel hasn't completed reading @@ -244,7 +244,7 @@ static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p, p->size = prev->size; p->channel_id = prev->channel_id; p->type = prev->type; - p->ts_delta = prev->ts_delta; + p->ts_field = prev->ts_field; p->extra = prev->extra; p->offset = prev->offset; p->read = prev->read + written; @@ -323,16 +323,16 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, timestamp -= prev_pkt[pkt->channel_id].timestamp; } if (timestamp >= 0xFFFFFF) { - pkt->ts_delta = 0xFFFFFF; + pkt->ts_field = 0xFFFFFF; } else { - pkt->ts_delta = timestamp; + pkt->ts_field = timestamp; } if (use_delta) { if (pkt->type == prev_pkt[pkt->channel_id].type && pkt->size == prev_pkt[pkt->channel_id].size) { mode = RTMP_PS_FOURBYTES; - if (pkt->ts_delta == prev_pkt[pkt->channel_id].ts_delta) + if (pkt->ts_field == prev_pkt[pkt->channel_id].ts_field) mode = RTMP_PS_ONEBYTE; } else { mode = RTMP_PS_EIGHTBYTES; @@ -349,7 +349,7 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, bytestream_put_le16(&p, pkt->channel_id - 64); } if (mode != RTMP_PS_ONEBYTE) { - bytestream_put_be24(&p, pkt->ts_delta); + bytestream_put_be24(&p, pkt->ts_field); if (mode != RTMP_PS_FOURBYTES) { bytestream_put_be24(&p, pkt->size); bytestream_put_byte(&p, pkt->type); @@ -357,14 +357,14 @@ int ff_rtmp_packet_write(URLContext *h, RTMPPacket *pkt, bytestream_put_le32(&p, pkt->extra); } } - if (pkt->ts_delta == 0xFFFFFF) + if (pkt->ts_field == 0xFFFFFF) bytestream_put_be32(&p, timestamp); // save history prev_pkt[pkt->channel_id].channel_id = pkt->channel_id; prev_pkt[pkt->channel_id].type = pkt->type; prev_pkt[pkt->channel_id].size = pkt->size; prev_pkt[pkt->channel_id].timestamp = pkt->timestamp; - prev_pkt[pkt->channel_id].ts_delta = pkt->ts_delta; + prev_pkt[pkt->channel_id].ts_field = pkt->ts_field; prev_pkt[pkt->channel_id].extra = pkt->extra; if ((ret = ffurl_write(h, pkt_hdr, p - pkt_hdr)) < 0) @@ -398,7 +398,7 @@ int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type, pkt->type = type; pkt->timestamp = timestamp; pkt->extra = 0; - pkt->ts_delta = 0; + pkt->ts_field = 0; return 0; } diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 741d8930df..0d98f60981 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -78,7 +78,7 @@ typedef struct RTMPPacket { int channel_id; ///< RTMP channel ID (nothing to do with audio/video channels though) RTMPPacketType type; ///< packet payload type uint32_t timestamp; ///< packet full timestamp - uint32_t ts_delta; ///< 24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets). Clipped to a maximum of 0xFFFFFF, indicating an extended timestamp field. + uint32_t ts_field; ///< 24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets). Clipped to a maximum of 0xFFFFFF, indicating an extended timestamp field. uint32_t extra; ///< probably an additional channel ID used during streaming data uint8_t *data; ///< packet payload int size; ///< packet payload size |