[FFmpeg-trac] #4929(avcodec:new): RTSP protocol not sending TEARDOWN packet
FFmpeg
trac at avcodec.org
Wed Oct 14 23:07:29 CEST 2015
#4929: RTSP protocol not sending TEARDOWN packet
-------------------------------------+-------------------------------------
Reporter: | Type: defect
nadenislamarre | Priority: important
Status: new | Version: git-
Component: avcodec | master
Keywords: TEARDOWN | Blocked By:
RTSP | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When a client close a rtsp connexion, it is supposed to send the TEARDOWN
packet according to
https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol
ffmpeg doesn't (controlled by wireshark), while i guess it worked at a
given time while the code to do it is inside ffmpeg.
In short, because my tv provider allows only 1 channel at a time, i've to
wait 30 seconds between each channel change.
Below, you'll find more detail, and a not perfect but working patch to
show the problem more in detail.
How to reproduce:
{{{
% ffplay
'rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=ld'
ffmpeg version : git version
}}}
The attached file is not really a patch while it's not the good way to
fix.
However, it works in my case.
The thing is that
rtsp::read_close function
containing ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri,
NULL);
is called after
is->abort_request = 1;
SDL_WaitThread(is->read_tid, NULL);
and at the end, the packet is never sent.
To quickly and badly fix, i've added a preclose function called before the
sdl_waitthread.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4929>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list