Revision e836b1b0

View differences:

libavformat/rtspdec.c
86 86
    return 0;
87 87
}
88 88

  
89
/* pause the stream */
90
static int rtsp_read_pause(AVFormatContext *s)
91
{
92
    RTSPState *rt = s->priv_data;
93
    RTSPMessageHeader reply1, *reply = &reply1;
94

  
95
    if (rt->state != RTSP_STATE_STREAMING)
96
        return 0;
97
    else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
98
        ff_rtsp_send_cmd(s, "PAUSE", rt->control_uri, NULL, reply, NULL);
99
        if (reply->status_code != RTSP_STATUS_OK) {
100
            return -1;
101
        }
102
    }
103
    rt->state = RTSP_STATE_PAUSED;
104
    return 0;
105
}
106

  
89 107
int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply)
90 108
{
91 109
    RTSPState *rt = s->priv_data;
......
292 310
    return 0;
293 311
}
294 312

  
295
/* pause the stream */
296
static int rtsp_read_pause(AVFormatContext *s)
297
{
298
    RTSPState *rt = s->priv_data;
299
    RTSPMessageHeader reply1, *reply = &reply1;
300

  
301
    if (rt->state != RTSP_STATE_STREAMING)
302
        return 0;
303
    else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
304
        ff_rtsp_send_cmd(s, "PAUSE", rt->control_uri, NULL, reply, NULL);
305
        if (reply->status_code != RTSP_STATUS_OK) {
306
            return -1;
307
        }
308
    }
309
    rt->state = RTSP_STATE_PAUSED;
310
    return 0;
311
}
312

  
313 313
static int rtsp_read_seek(AVFormatContext *s, int stream_index,
314 314
                          int64_t timestamp, int flags)
315 315
{

Also available in: Unified diff