diff options
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r-- | libavformat/rtpproto.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 1f0a82ac7e..ca63c165e4 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -363,10 +363,8 @@ static int rtp_open(URLContext *h, const char *uri, int flags) return 0; fail: - if (s->rtp_hd) - ffurl_close(s->rtp_hd); - if (s->rtcp_hd) - ffurl_close(s->rtcp_hd); + ffurl_closep(&s->rtp_hd); + ffurl_closep(&s->rtcp_hd); ffurl_closep(&s->fec_hd); av_free(fec_protocol); av_dict_free(&fec_opts); @@ -506,8 +504,8 @@ static int rtp_close(URLContext *h) ff_ip_reset_filters(&s->filters); - ffurl_close(s->rtp_hd); - ffurl_close(s->rtcp_hd); + ffurl_closep(&s->rtp_hd); + ffurl_closep(&s->rtcp_hd); ffurl_closep(&s->fec_hd); return 0; } |