On 16 September 2013 00:21, Josh Allmann <[email protected]> wrote:
> On 15 September 2013 07:54, Luca Barbato <[email protected]> wrote:
>> ---
>>  libavformat/rtmpproto.c | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
>> index 03f5761..e1a7782 100644
>> --- a/libavformat/rtmpproto.c
>> +++ b/libavformat/rtmpproto.c
>> @@ -1903,6 +1903,13 @@ static int send_invoke_response(URLContext *s, 
>> RTMPPacket *pkt)
>>          // Send onStatus(NetStream.Publish.Start)
>>          return write_status(s, pkt, "NetStream.Publish.Start",
>>                             filename);
>> +    } else if (!strcmp(command, "play")) {
>> +        ret = write_begin(s);
>> +        if (ret < 0)
>> +            return ret;
>> +        rt->state = STATE_PUBLISHING;
>> +        return write_status(s, pkt, "NetStream.Play.Start",
>> +                            filename);
>>      } else {
>>          if ((ret = ff_rtmp_packet_create(&spkt, RTMP_SYSTEM_CHANNEL,
>>                                           RTMP_PT_INVOKE, 0,
>> @@ -2523,7 +2530,6 @@ reconnect:
>>      } else {
>>          if (read_connect(s, s->priv_data) < 0)
>>              goto fail;
>> -        rt->is_input = 1;
>>      }
>>
>>      do {
>> --
>> 1.8.3.2
>>
>
> IIRC for compatibility with the Flash player you'll also need to send
> a (following the librtmp terminology) type-0 control message with the
> stream ID. This would correspond here to (the somewhat incorrectly
> named) RTMP_PT_PING, followed by a body of be16(zero),
> amf32(streamid). Can supply a proper patch for this in the morning.

Never mind; this is already addressed in write_begin from the previous
patch. Sorry for the noise.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to