diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-12-01 19:08:44 +0300 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-12-01 19:08:44 +0300 |
commit | e6b244a3b986e513779aec83beab4fb25a130aa2 (patch) | |
tree | c032b7a7329bc0bafc710cd5a2bfc68a841993e5 /libavformat/rtmppkt.c | |
parent | b1eb53ab59414b23a26f6e4af28bd3cd54b06220 (diff) |
Full-header RTMP packets contain real timestamp, others contain timestamp
difference, so make all read packets store absolute timestamp.
As a consequence, we don't need to track audio/video timestamps separately
any longer in protocol handler.
Originally committed as revision 20685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtmppkt.c')
-rw-r--r-- | libavformat/rtmppkt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index 6c2e2f5b37..37846e3cea 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -116,6 +116,8 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, return AVERROR(EIO); timestamp = AV_RB32(buf); } + if (hdr != RTMP_PS_TWELVEBYTES) + timestamp += prev_pkt[channel_id].timestamp; } if (ff_rtmp_packet_create(p, channel_id, type, timestamp, data_size)) return -1; |