Mercurial > libavformat.hg
comparison rtsp.c @ 3904:52e586c04402 libavformat
Reindent after previous patch.
author | rbultje |
---|---|
date | Sun, 07 Sep 2008 01:24:01 +0000 |
parents | aeb79f68ba7e |
children | 91987686113d |
comparison
equal
deleted
inserted
replaced
3903:aeb79f68ba7e | 3904:52e586c04402 |
---|---|
1370 char cmd[1024]; | 1370 char cmd[1024]; |
1371 | 1371 |
1372 av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); | 1372 av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); |
1373 | 1373 |
1374 if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { | 1374 if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { |
1375 if (rt->state == RTSP_STATE_PAUSED) { | 1375 if (rt->state == RTSP_STATE_PAUSED) { |
1376 snprintf(cmd, sizeof(cmd), | 1376 snprintf(cmd, sizeof(cmd), |
1377 "PLAY %s RTSP/1.0\r\n", | 1377 "PLAY %s RTSP/1.0\r\n", |
1378 s->filename); | 1378 s->filename); |
1379 } else { | 1379 } else { |
1380 snprintf(cmd, sizeof(cmd), | 1380 snprintf(cmd, sizeof(cmd), |
1381 "PLAY %s RTSP/1.0\r\n" | 1381 "PLAY %s RTSP/1.0\r\n" |
1382 "Range: npt=%0.3f-\r\n", | 1382 "Range: npt=%0.3f-\r\n", |
1383 s->filename, | 1383 s->filename, |
1384 (double)rt->seek_timestamp / AV_TIME_BASE); | 1384 (double)rt->seek_timestamp / AV_TIME_BASE); |
1385 } | 1385 } |
1386 rtsp_send_cmd(s, cmd, reply, NULL); | 1386 rtsp_send_cmd(s, cmd, reply, NULL); |
1387 if (reply->status_code != RTSP_STATUS_OK) { | 1387 if (reply->status_code != RTSP_STATUS_OK) { |
1388 return -1; | 1388 return -1; |
1389 } | 1389 } |
1390 } | 1390 } |
1391 rt->state = RTSP_STATE_PLAYING; | 1391 rt->state = RTSP_STATE_PLAYING; |
1392 return 0; | 1392 return 0; |
1393 } | 1393 } |
1394 | 1394 |
1402 rt = s->priv_data; | 1402 rt = s->priv_data; |
1403 | 1403 |
1404 if (rt->state != RTSP_STATE_PLAYING) | 1404 if (rt->state != RTSP_STATE_PLAYING) |
1405 return 0; | 1405 return 0; |
1406 else if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { | 1406 else if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) { |
1407 snprintf(cmd, sizeof(cmd), | 1407 snprintf(cmd, sizeof(cmd), |
1408 "PAUSE %s RTSP/1.0\r\n", | 1408 "PAUSE %s RTSP/1.0\r\n", |
1409 s->filename); | 1409 s->filename); |
1410 rtsp_send_cmd(s, cmd, reply, NULL); | 1410 rtsp_send_cmd(s, cmd, reply, NULL); |
1411 if (reply->status_code != RTSP_STATUS_OK) { | 1411 if (reply->status_code != RTSP_STATUS_OK) { |
1412 return -1; | 1412 return -1; |
1413 } | 1413 } |
1414 } | 1414 } |
1415 rt->state = RTSP_STATE_PAUSED; | 1415 rt->state = RTSP_STATE_PAUSED; |
1416 return 0; | 1416 return 0; |
1417 } | 1417 } |
1418 | 1418 |