diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 8a2abc8ee9..28b35d1993 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -744,9 +744,9 @@ static int rtsp_read_header(AVFormatContext *s) if (rt->initial_pause) { /* do not start immediately */ } else { - if ((ret = rtsp_read_play(s)) < 0) { + ret = rtsp_read_play(s); + if (ret < 0) goto fail; - } } }