Commit 1df4021e authored by rbultje's avatar rbultje

Make rtsp_close_streams() take a AVFormatContext instead of a RTSPState

argument, so we can use AVFormatContext->* here in the future.

Patch by Martin Storsjö <$firstname $firstname st>.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21911 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 47e4d77b
...@@ -572,8 +572,9 @@ static int sdp_parse(AVFormatContext *s, const char *content) ...@@ -572,8 +572,9 @@ static int sdp_parse(AVFormatContext *s, const char *content)
} }
/* close and free RTSP streams */ /* close and free RTSP streams */
static void rtsp_close_streams(RTSPState *rt) static void rtsp_close_streams(AVFormatContext *s)
{ {
RTSPState *rt = s->priv_data;
int i; int i;
RTSPStream *rtsp_st; RTSPStream *rtsp_st;
...@@ -1421,7 +1422,7 @@ redirect: ...@@ -1421,7 +1422,7 @@ redirect:
} }
return 0; return 0;
fail: fail:
rtsp_close_streams(rt); rtsp_close_streams(s);
av_freep(&content); av_freep(&content);
url_close(rt->rtsp_hd); url_close(rt->rtsp_hd);
if (reply->status_code >=300 && reply->status_code < 400) { if (reply->status_code >=300 && reply->status_code < 400) {
...@@ -1759,7 +1760,7 @@ static int rtsp_read_close(AVFormatContext *s) ...@@ -1759,7 +1760,7 @@ static int rtsp_read_close(AVFormatContext *s)
s->filename); s->filename);
rtsp_send_cmd_async(s, cmd); rtsp_send_cmd_async(s, cmd);
rtsp_close_streams(rt); rtsp_close_streams(s);
url_close(rt->rtsp_hd); url_close(rt->rtsp_hd);
return 0; return 0;
} }
...@@ -1839,14 +1840,13 @@ static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1839,14 +1840,13 @@ static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
} }
return 0; return 0;
fail: fail:
rtsp_close_streams(rt); rtsp_close_streams(s);
return err; return err;
} }
static int sdp_read_close(AVFormatContext *s) static int sdp_read_close(AVFormatContext *s)
{ {
RTSPState *rt = s->priv_data; rtsp_close_streams(s);
rtsp_close_streams(rt);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment