aboutsummaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-10-04 14:18:22 +0200
committerMichael Niedermayer2013-10-04 14:18:32 +0200
commitb8e44118b13614f74c13a5540fdac4a5f097b70d (patch)
tree588768a3ec7ea322661602dbb393d8f88114d905 /libavformat/rtmpproto.c
parent205b6021358efa06c66e835dd4b265cf7cbc4047 (diff)
parent24fee95321c1463360ba7042d026dae021854360 (diff)
Merge commit '24fee95321c1463360ba7042d026dae021854360'
* commit '24fee95321c1463360ba7042d026dae021854360': rtmpproto: Move the flv header/trailer addition to append_flv_data Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 77903e47a8..1207519219 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2074,11 +2074,11 @@ static int update_offset(RTMPContext *rt, int size)
if (rt->flv_off < rt->flv_size) {
// There is old unread data in the buffer, thus append at the end
old_flv_size = rt->flv_size;
- rt->flv_size += size + 15;
+ rt->flv_size += size;
} else {
// All data has been read, write the new data at the start of the buffer
old_flv_size = 0;
- rt->flv_size = size + 15;
+ rt->flv_size = size;
rt->flv_off = 0;
}
@@ -2093,7 +2093,7 @@ static int append_flv_data(RTMPContext *rt, RTMPPacket *pkt, int skip)
const int size = pkt->size - skip;
uint32_t ts = pkt->timestamp;
- old_flv_size = update_offset(rt, size);
+ old_flv_size = update_offset(rt, size + 15);
if ((ret = av_reallocp(&rt->flv_data, rt->flv_size)) < 0) {
rt->flv_size = rt->flv_off = 0;
@@ -2226,7 +2226,6 @@ static int handle_metadata(RTMPContext *rt, RTMPPacket *pkt)
next += size + 3 + 4;
p += size + 3 + 4;
}
- memcpy(p, next, RTMP_HEADER);
return 0;
}