Mercurial > libavformat.hg
comparison avio.c @ 2757:39cac1b7296e libavformat
Call prot->url_close only if it is present.
author | alex |
---|---|
date | Fri, 16 Nov 2007 00:14:48 +0000 |
parents | 00ffc2f02705 |
children | 50e2307414ee |
comparison
equal
deleted
inserted
replaced
2756:8258fb5a6aa0 | 2757:39cac1b7296e |
---|---|
130 return ret; | 130 return ret; |
131 } | 131 } |
132 | 132 |
133 int url_close(URLContext *h) | 133 int url_close(URLContext *h) |
134 { | 134 { |
135 int ret; | 135 int ret = 0; |
136 if (!h) return 0; /* can happen when url_open fails */ | 136 if (!h) return 0; /* can happen when url_open fails */ |
137 | 137 |
138 ret = h->prot->url_close(h); | 138 if (h->prot->url_close) |
139 ret = h->prot->url_close(h); | |
139 av_free(h); | 140 av_free(h); |
140 return ret; | 141 return ret; |
141 } | 142 } |
142 | 143 |
143 int url_exist(const char *filename) | 144 int url_exist(const char *filename) |