[FFmpeg-devel] [PATCH] RTSP muxer, round 5

Luca Barbato lu_zero
Fri Feb 26 17:27:42 CET 2010


On 02/22/2010 10:01 PM, Martin Storsj? wrote:
> On Mon, 22 Feb 2010, Ronald S. Bultje wrote:
> 
>> Hi,
>>
>> On Fri, Feb 19, 2010 at 6:05 PM, Martin Storsj? <martin at martin.st> wrote:
>> [9]:
>>
>> +static int rtsp_write_close(AVFormatContext *s)
>> +{
>> +    RTSPState *rt = s->priv_data;
>> +    char cmd[1024];
>> +
>> +    snprintf(cmd, sizeof(cmd),
>> +             "PAUSE %s RTSP/1.0\r\n",
>> +             s->filename);
>> +    rtsp_send_cmd_async(s, cmd);
>> +
>> +    snprintf(cmd, sizeof(cmd),
>> +             "TEARDOWN %s RTSP/1.0\r\n",
>> +             s->filename);
>> +    rtsp_send_cmd_async(s, cmd);
>> +
>> +    rtsp_close_streams(s);
>> +    url_close(rt->rtsp_hd);
>> +    return 0;
>> +}
>>
>> Why do you send both PAUSE and TEARDOWN?
> 
> I've modelled much behaviour after QuickTime Broadcaster, which did this, 
> IIRC. The PAUSE didn't seem to be necessary, though, so removed.

I'd keep that, teardown is supposed to "just" invalidate rtsp the session...

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero




More information about the ffmpeg-devel mailing list