comparison rtsp.c @ 3861:a0098594ab90 libavformat

Remove useless "else" case in if X { A; return }; else { B }. See discussion in "Realmedia patch" thread on mailinglist.
author rbultje
date Mon, 01 Sep 2008 13:51:24 +0000
parents d8fce96bb3ab
children 1026953d4ffe
comparison
equal deleted inserted replaced
3860:d8fce96bb3ab 3861:a0098594ab90
1341 (double)rt->seek_timestamp / AV_TIME_BASE); 1341 (double)rt->seek_timestamp / AV_TIME_BASE);
1342 } 1342 }
1343 rtsp_send_cmd(s, cmd, reply, NULL); 1343 rtsp_send_cmd(s, cmd, reply, NULL);
1344 if (reply->status_code != RTSP_STATUS_OK) { 1344 if (reply->status_code != RTSP_STATUS_OK) {
1345 return -1; 1345 return -1;
1346 } else { 1346 }
1347 rt->state = RTSP_STATE_PLAYING; 1347 rt->state = RTSP_STATE_PLAYING;
1348 return 0; 1348 return 0;
1349 }
1350 } 1349 }
1351 1350
1352 /* pause the stream */ 1351 /* pause the stream */
1353 static int rtsp_read_pause(AVFormatContext *s) 1352 static int rtsp_read_pause(AVFormatContext *s)
1354 { 1353 {
1365 "PAUSE %s RTSP/1.0\r\n", 1364 "PAUSE %s RTSP/1.0\r\n",
1366 s->filename); 1365 s->filename);
1367 rtsp_send_cmd(s, cmd, reply, NULL); 1366 rtsp_send_cmd(s, cmd, reply, NULL);
1368 if (reply->status_code != RTSP_STATUS_OK) { 1367 if (reply->status_code != RTSP_STATUS_OK) {
1369 return -1; 1368 return -1;
1370 } else { 1369 }
1371 rt->state = RTSP_STATE_PAUSED; 1370 rt->state = RTSP_STATE_PAUSED;
1372 return 0; 1371 return 0;
1373 }
1374 } 1372 }
1375 1373
1376 static int rtsp_read_seek(AVFormatContext *s, int stream_index, 1374 static int rtsp_read_seek(AVFormatContext *s, int stream_index,
1377 int64_t timestamp, int flags) 1375 int64_t timestamp, int flags)
1378 { 1376 {