2011/5/18 Måns Rullgård <[email protected]>: > Mike Williams <[email protected]> writes: > >> Signed-off-by: Mike Williams <[email protected]> >> --- >> ffserver.c | 11 ++++------- >> 1 files changed, 4 insertions(+), 7 deletions(-) >> >> diff --git a/ffserver.c b/ffserver.c >> index b95a854..56bcba5 100644 >> --- a/ffserver.c >> +++ b/ffserver.c >> @@ -3274,7 +3274,6 @@ static void rtsp_cmd_pause(HTTPContext *c, const char >> *url, RTSPMessageHeader *h >> static void rtsp_cmd_teardown(HTTPContext *c, const char *url, >> RTSPMessageHeader *h) >> { >> HTTPContext *rtp_c; >> - char session_id[32]; >> >> rtp_c = find_rtp_session_with_url(url, h->session_id); >> if (!rtp_c) { >> @@ -3282,16 +3281,14 @@ static void rtsp_cmd_teardown(HTTPContext *c, const >> char *url, RTSPMessageHeader >> return; >> } >> >> - av_strlcpy(session_id, rtp_c->session_id, sizeof(session_id)); >> - >> - /* abort the session */ >> - close_connection(rtp_c); >> - >> /* now everything is OK, so we can send the connection parameters */ >> rtsp_reply_header(c, RTSP_STATUS_OK); >> /* session ID */ >> - avio_printf(c->pb, "Session: %s\r\n", session_id); >> + avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); >> avio_printf(c->pb, "\r\n"); >> + >> + /* abort the session */ >> + close_connection(rtp_c); > > This is doing more than the commit message suggests (moving the > close_connection() call).
Should I amend the commit message or do you foresee a problem with moving the close_connection() call? I've looked through it, and it "works for me" when I tested it, but I am very new to this code base. Thanks, Mike Williams _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
