History

avformat/rtmpproto: Fix 2 more cases of the 2nd packet size being wrong

This should fix RTMP input which was broken by cbbd906be6150be38dfc14b6bc67dcac8da8aea4 the 40 + 11 case is untested as it did not occur in the testcase

Michael Niedermayer committed 11 years ago

Commit 94d50b51 parent ac7b1f71 file · +3 −2Browse files

Unified · Split

libavformat/rtmpproto.c+3−2
@@ -2368,8 +2368,9 @@ static int handle_metadata(RTMPContext *rt, RTMPPacket *pkt) · 2367 unmodified lines
23682368 bytestream_put_be24(&p, ts);
23692369 bytestream_put_byte(&p, ts >> 24);
23702370 memcpy(p, next, size + 3 + 4);
2371+ p += size + 3;
2372+ bytestream_put_be32(&p, size + 11);
23712373 next += size + 3 + 4;
2372− p += size + 3 + 4;
23732374 }
23742375 if (p != rt->flv_data + rt->flv_size) {
23752376 av_log(NULL, AV_LOG_WARNING, "Incomplete flv packets in "
@@ -2559,7 +2560,7 @@ static int inject_fake_duration_metadata(RTMPContext *rt) · 183 unmodified lines
25592560 // Finalise object
25602561 bytestream_put_be16(&p, 0); // Empty string
25612562 bytestream_put_byte(&p, AMF_END_OF_OBJECT);
2562− bytestream_put_be32(&p, 40); // size of data part (sum of all parts below)
2563+ bytestream_put_be32(&p, 40 + 11); // size of data part (sum of all parts below)
25632564
25642565 return 0;
25652566 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t