Revision 3df54c6b

View differences:

libavformat/rtsp.c
758 758

  
759 759
int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
760 760
                       unsigned char **content_ptr,
761
                       int return_on_interleaved_data)
761
                       int return_on_interleaved_data, const char *method)
762 762
{
763 763
    RTSPState *rt = s->priv_data;
764 764
    char buf[4096], buf1[1024], *q;
......
936 936
                                                   send_content_length)))
937 937
        return ret;
938 938

  
939
    if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0) ) < 0)
939
    if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0, method) ) < 0)
940 940
        return ret;
941 941

  
942 942
    if (reply->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&
......
1512 1512
            if (tcp_fd != -1 && FD_ISSET(tcp_fd, &rfds)) {
1513 1513
                RTSPMessageHeader reply;
1514 1514

  
1515
                ret = ff_rtsp_read_reply(s, &reply, NULL, 0);
1515
                ret = ff_rtsp_read_reply(s, &reply, NULL, 0, NULL);
1516 1516
                if (ret < 0)
1517 1517
                    return ret;
1518 1518
                /* XXX: parse message */
libavformat/rtsp.h
434 434
 *                   data packets (if they are encountered), until a reply
435 435
 *                   has been fully parsed. If no more data is available
436 436
 *                   without parsing a reply, it will return an error.
437
 * @param method the RTSP method this is a reply to. This affects how
438
 *               some response headers are acted upon. May be NULL.
437 439
 *
438 440
 * @return 1 if a data packets is ready to be received, -1 on error,
439 441
 *          and 0 on success.
440 442
 */
441 443
int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
442 444
                       unsigned char **content_ptr,
443
                       int return_on_interleaved_data);
445
                       int return_on_interleaved_data, const char *method);
444 446

  
445 447
/**
446 448
 * Skip a RTP/TCP interleaved packet.
libavformat/rtspdec.c
170 170
    for (;;) {
171 171
        RTSPMessageHeader reply;
172 172

  
173
        ret = ff_rtsp_read_reply(s, &reply, NULL, 1);
173
        ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL);
174 174
        if (ret < 0)
175 175
            return ret;
176 176
        if (ret == 1) /* received '$' */
libavformat/rtspenc.c
195 195
             * since it would block and wait for an RTSP reply on the socket
196 196
             * (which may not be coming any time soon) if it handles
197 197
             * interleaved packets internally. */
198
            ret = ff_rtsp_read_reply(s, &reply, NULL, 1);
198
            ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL);
199 199
            if (ret < 0)
200 200
                return AVERROR(EPIPE);
201 201
            if (ret == 1)

Also available in: Unified diff