[FFmpeg-devel] [PATCH] libavformat/rtspdec: Don't send teardown if rtsp_hd_out is null

Ross Nicholson phunkyfish at gmail.com
Mon Aug 5 10:18:32 EEST 2019


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 Mon, 5 Aug 2019 at 08:17, Ross Nicholson <phunkyfish at gmail.com> wrote:

> From: phunkyfish <phunkyfish at 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)
>
>


More information about the ffmpeg-devel mailing list