| 3247 | } |
| 3248 | |
| 3249 | static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) |
| 3250 | { |
| 3251 | HTTPContext *rtp_c; |
| 3252 | |
| 3253 | rtp_c = find_rtp_session_with_url(url, h->session_id); |
| 3254 | if (!rtp_c) { |
| 3255 | rtsp_reply_error(c, RTSP_STATUS_SESSION); |
| 3256 | return; |
| 3257 | } |
| 3258 | |
| 3259 | if (rtp_c->state != HTTPSTATE_SEND_DATA && |
| 3260 | rtp_c->state != HTTPSTATE_WAIT_FEED) { |
| 3261 | rtsp_reply_error(c, RTSP_STATUS_STATE); |
| 3262 | return; |
| 3263 | } |
| 3264 | |
| 3265 | rtp_c->state = HTTPSTATE_READY; |
| 3266 | rtp_c->first_pts = AV_NOPTS_VALUE; |
| 3267 | /* now everything is OK, so we can send the connection parameters */ |
| 3268 | rtsp_reply_header(c, RTSP_STATUS_OK); |
| 3269 | /* session ID */ |
| 3270 | url_fprintf(c->pb, "Session: %s\r\n", rtp_c->session_id); |
| 3271 | url_fprintf(c->pb, "\r\n"); |
| 3272 | } |
| 3273 | |
| 3274 | static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h) |
| 3275 | { |
no test coverage detected