B Kaser <[email protected]> added the comment:
Here is the diff of my changes with the trunk:
$ svn diff rtmpproto.c
Index: rtmpproto.c
===================================================================
--- rtmpproto.c (revision 24140)
+++ rtmpproto.c (working copy)
@@ -926,7 +926,7 @@
static int rtmp_write(URLContext *h, const uint8_t *buf, int size)
{
RTMPContext *rt = h->priv_data;
- int size_temp = size;
+ int size_temp;
int pktsize, pkttype;
uint32_t ts;
const uint8_t *buf_temp = buf;
@@ -941,7 +941,6 @@
//skip flv header
if (buf_temp[0] == 'F' && buf_temp[1] == 'L' && buf_temp[2] ==
'V') {
buf_temp += 9 + 4;
- size_temp -= 9 + 4;
}
pkttype = bytestream_get_byte(&buf_temp);
@@ -949,7 +948,6 @@
ts = bytestream_get_be24(&buf_temp);
ts |= bytestream_get_byte(&buf_temp) << 24;
bytestream_get_be24(&buf_temp);
- size_temp -= 11;
rt->flv_size = pktsize;
//force 12bytes header
@@ -969,6 +967,7 @@
ff_amf_write_string(&rt->flv_data, "@setDataFrame");
}
+ size_temp = size - (buf_temp - buf);
if (rt->flv_size - rt->flv_off > size_temp) {
bytestream_get_buffer(&buf_temp, rt->flv_data + rt->flv_off,
size_temp);
rt->flv_off += size_temp;
@@ -985,7 +984,7 @@
rt->flv_size = 0;
rt->flv_off = 0;
}
- } while (buf_temp - buf < size_temp);
+ } while (buf_temp - buf < size);
return size;
}
________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2084>
________________________________________________