On Sun, 15 Sep 2013, Luca Barbato 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);
I think it would be better for the code clarity to add a new state for this situation, instead of reusing the publishing state. We already have 3 different states for playing, publishing and receiving, so this would be 'serving' or something like that? I guess it needs to be added to a few of the existing cases where we check for the publishing state.
With the other hunk that should be moved from patch 1, this otherwise looks pretty good I think.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
