1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

rtmp: send check_bw as notification

Set the transactionId to 0 to signal the server a return _result/_error
is not expected.

Solves the problems experienced with strict rtmp servers.
This commit is contained in:
Luca Barbato 2012-08-08 11:49:02 +02:00
parent e78e6c37ef
commit 82613564cf
2 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,15 @@
#define HMAC_IPAD_VAL 0x36 #define HMAC_IPAD_VAL 0x36
#define HMAC_OPAD_VAL 0x5C #define HMAC_OPAD_VAL 0x5C
/**
* A non-zero transaction id requires the server to send back
* a _result or _error response.
* Setting it to 0 marks the message as a notification not
* requiring feedback.
*/
#define RTMP_NOTIFICATION 0
/** /**
* emulated Flash client version - 9.0.124.2 on Linux * emulated Flash client version - 9.0.124.2 on Linux
* @{ * @{

View File

@ -573,7 +573,7 @@ static int gen_check_bw(URLContext *s, RTMPContext *rt)
p = pkt.data; p = pkt.data;
ff_amf_write_string(&p, "_checkbw"); ff_amf_write_string(&p, "_checkbw");
ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_number(&p, RTMP_NOTIFICATION);
ff_amf_write_null(&p); ff_amf_write_null(&p);
ret = ff_rtmp_packet_write(rt->stream, &pkt, rt->chunk_size, ret = ff_rtmp_packet_write(rt->stream, &pkt, rt->chunk_size,