[Libav-user] RTSP stack doesn't sent TEARDOWN & RTCP Goodbye to close the connection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] RTSP stack doesn't sent TEARDOWN & RTCP Goodbye to close the connection

Mert Gedik
Hi team,

When I close the RTSP stream gracefully, the socket on the server seems still open, then We've realized that RTSP stack in ffmpeg doesn't close the connection. 

With an hacky way, or workaround (see below), We are able to send RTSP Teardown message but  when We stop streaming, still the socket on the server isn't closed properly.
Then, We tried with VLC and see that it's working, later We compared the wireshark captures of ffmpeg and vlc and see that VLC is also sending RTCP Goodbye message, and this makes the sockets on server close gracefully. How can We also send RTCP Goodbye message like VLC ?
Thanks in advance.

Regards,

MG


        RTSPState *r = (RTSPState *)avFormatCtx->priv_data;

        ff_rtsp_send_cmd_async(avFormatCtx, "TEARDOWN", r->control_uri, NULL);


_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: RTSP stack doesn't sent TEARDOWN & RTCP Goodbye to close the connection

Steve Sisak
IIRC, you need to send a NULL sample buffer to flush the pipeline before closing. (From memory)

Sent from my iPhone

On Jul 1, 2019, at 8:23 PM, Mert Gedik <[hidden email]> wrote:

Hi team,

When I close the RTSP stream gracefully, the socket on the server seems still open, then We've realized that RTSP stack in ffmpeg doesn't close the connection. 

With an hacky way, or workaround (see below), We are able to send RTSP Teardown message but  when We stop streaming, still the socket on the server isn't closed properly.
Then, We tried with VLC and see that it's working, later We compared the wireshark captures of ffmpeg and vlc and see that VLC is also sending RTCP Goodbye message, and this makes the sockets on server close gracefully. How can We also send RTCP Goodbye message like VLC ?
Thanks in advance.

Regards,

MG


        RTSPState *r = (RTSPState *)avFormatCtx->priv_data;

        ff_rtsp_send_cmd_async(avFormatCtx, "TEARDOWN", r->control_uri, NULL);

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".