diff mbox

[FFmpeg-devel] Don't send teardown if rtsp_hd_out is null

Message ID 20190804213910.909-1-phunkyfish@gmail.com
State Superseded
Headers show

Commit Message

Ross Nicholson Aug. 4, 2019, 9:39 p.m. UTC
From: phunkyfish <phunkyfish@gmail.com>

---
 libavformat/rtspdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ross Nicholson Aug. 5, 2019, 7:16 a.m. UTC | #1
Wrong commit message/subject. Please ignore. Will send new patch shortly.

On Sun, 4 Aug 2019 at 22:41, Ross Nicholson <phunkyfish@gmail.com> wrote:

> Example stream that does not work: rtsp://
> 184.72.239.149/vod/mp4:BigBuckBunny_115k.mov
>
> Extending the condition allows the stream to be processed correctly.
>
> On Sun, 4 Aug 2019 at 22:39, Ross Nicholson <phunkyfish@gmail.com> wrote:
>
>> From: phunkyfish <phunkyfish@gmail.com>
>>
>> ---
>>  libavformat/rtspdec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
>> index 32dff2319c..3a79d1b175 100644
>> --- a/libavformat/rtspdec.c
>> +++ b/libavformat/rtspdec.c
>> @@ -57,7 +57,7 @@ static int rtsp_read_close(AVFormatContext *s)
>>  {
>>      RTSPState *rt = s->priv_data;
>>
>> -    if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN))
>> +    if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN) && rt->rtsp_hd_out)
>>          ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL);
>>
>>      ff_rtsp_close_streams(s);
>> --
>> 2.20.1 (Apple Git-117)
>>
>>
diff mbox

Patch

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 32dff2319c..3a79d1b175 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -57,7 +57,7 @@  static int rtsp_read_close(AVFormatContext *s)
 {
     RTSPState *rt = s->priv_data;
 
-    if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN))
+    if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN) && rt->rtsp_hd_out)
         ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL);
 
     ff_rtsp_close_streams(s);