X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtmpproto.c;h=2e33dc8fea081f230364d4ff755c13b6a9bd263c;hb=8deb1fdac84e58691d4ca940a7b815feee67bc3e;hp=73ba89bec2ccd5401fc3fb730cba42e562692ead;hpb=c2972a2800242229ac22e882fe60245a44ac026c;p=ffmpeg diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 73ba89bec2c..2e33dc8fea0 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2368,8 +2368,9 @@ static int handle_metadata(RTMPContext *rt, RTMPPacket *pkt) bytestream_put_be24(&p, ts); bytestream_put_byte(&p, ts >> 24); memcpy(p, next, size + 3 + 4); + p += size + 3; + bytestream_put_be32(&p, size + 11); next += size + 3 + 4; - p += size + 3 + 4; } if (p != rt->flv_data + rt->flv_size) { av_log(NULL, AV_LOG_WARNING, "Incomplete flv packets in " @@ -2559,7 +2560,7 @@ static int inject_fake_duration_metadata(RTMPContext *rt) // Finalise object bytestream_put_be16(&p, 0); // Empty string bytestream_put_byte(&p, AMF_END_OF_OBJECT); - bytestream_put_be32(&p, 40); // size of data part (sum of all parts below) + bytestream_put_be32(&p, 40 + 11); // size of data part (sum of all parts below) return 0; }