int ff_rtsp_send_cmd_with_content(AVFormatContext *s,

                                  const char *method, const char *url,

                                  const char *header,

                                  RTSPMessageHeader *reply,

                                  unsigned char **content_ptr,

                                  const unsigned char *send_content,

                                  int send_content_length)

{

    RTSPState *rt = s->priv_data;

    HTTPAuthType cur_auth_type;

    int ret;



retry:

    cur_auth_type = rt->auth_state.auth_type;

    if ((ret = ff_rtsp_send_cmd_with_content_async(s, method, url, header,

                                                   send_content,

                                                   send_content_length)))

        return ret;



    if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0, method) ) < 0)

        return ret;



    if (reply->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&

        rt->auth_state.auth_type != HTTP_AUTH_NONE)

        goto retry;



    if (reply->status_code > 400){

        av_log(s, AV_LOG_ERROR, "method %s failed: %d%s\n",

               method,

               reply->status_code,

               reply->reason);

        av_log(s, AV_LOG_DEBUG, "%s\n", rt->last_reply);

    }



    return 0;

}

int ff_rtsp_send_cmd_with_content(AVFormatContext *s,

                                  const char *method, const char *url,

                                  const char *header,

                                  RTSPMessageHeader *reply,

                                  unsigned char **content_ptr,

                                  const unsigned char *send_content,

                                  int send_content_length)

{

    RTSPState *rt = s->priv_data;

    HTTPAuthType cur_auth_type;

    int ret;



retry:

    cur_auth_type = rt->auth_state.auth_type;

    if ((ret = ff_rtsp_send_cmd_with_content_async(s, method, url, header,

                                                   send_content,

                                                   send_content_length)))

        return ret;



    if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0, method) ) < 0)

        return ret;



    if (reply->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&

        rt->auth_state.auth_type != HTTP_AUTH_NONE)

        goto retry;



    if (reply->status_code > 400){

        av_log(s, AV_LOG_ERROR, "method %s failed: %d%s\n",

               method,

               reply->status_code,

               reply->reason);

        av_log(s, AV_LOG_DEBUG, "%s\n", rt->last_reply);

    }



    return 0;

}

    int ret;     if (reply->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&         rt->auth_state.auth_type != HTTP_AUTH_NONE)
int FUNC_0(AVFormatContext *VAR_0,

                                  const char *VAR_1, const char *VAR_2,

                                  const char *VAR_3,

                                  RTSPMessageHeader *VAR_4,

                                  unsigned char **VAR_5,

                                  const unsigned char *VAR_6,

                                  int VAR_7)

{

    RTSPState *rt = VAR_0->priv_data;

    HTTPAuthType cur_auth_type;

    int VAR_8;



retry:

    cur_auth_type = rt->auth_state.auth_type;

    if ((VAR_8 = ff_rtsp_send_cmd_with_content_async(VAR_0, VAR_1, VAR_2, VAR_3,

                                                   VAR_6,

                                                   VAR_7)))

        return VAR_8;



    if ((VAR_8 = ff_rtsp_read_reply(VAR_0, VAR_4, VAR_5, 0, VAR_1) ) < 0)

        return VAR_8;



    if (VAR_4->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&

        rt->auth_state.auth_type != HTTP_AUTH_NONE)

        goto retry;



    if (VAR_4->status_code > 400){

        av_log(VAR_0, AV_LOG_ERROR, "VAR_1 %VAR_0 failed: %d%VAR_0\n",

               VAR_1,

               VAR_4->status_code,

               VAR_4->reason);

        av_log(VAR_0, AV_LOG_DEBUG, "%VAR_0\n", rt->last_reply);

    }



    return 0;

}

int FUNC_0(AVFormatContext *VAR_0,
const char *VAR_1, const char *VAR_2,
const char *VAR_3,
RTSPMessageHeader *VAR_4,
unsigned char **VAR_5,
const unsigned char *VAR_6,
int VAR_7)
{ RTSPState *rt = VAR_0->priv_data; HTTPAuthType cur_auth_type; int VAR_8; retry:
cur_auth_type = rt->auth_state.auth_type; if ((VAR_8 = ff_rtsp_send_cmd_with_content_async(VAR_0, VAR_1, VAR_2, VAR_3,
VAR_6,
VAR_7)))
return VAR_8; if ((VAR_8 = ff_rtsp_read_reply(VAR_0, VAR_4, VAR_5, 0, VAR_1) ) < 0)
return VAR_8; if (VAR_4->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&
rt->auth_state.auth_type != HTTP_AUTH_NONE)
goto retry; if (VAR_4->status_code > 400){ av_log(VAR_0, AV_LOG_ERROR, "VAR_1 %VAR_0 failed: %d%VAR_0\n",
VAR_1,
VAR_4->status_code,
VAR_4->reason); av_log(VAR_0, AV_LOG_DEBUG, "%VAR_0\n", rt->last_reply); } return 0; }