Mercurial > libavformat.hg
diff 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 |
line wrap: on
line diff
--- a/avio.c Fri Nov 16 00:09:34 2007 +0000 +++ b/avio.c Fri Nov 16 00:14:48 2007 +0000 @@ -132,10 +132,11 @@ int url_close(URLContext *h) { - int ret; + int ret = 0; if (!h) return 0; /* can happen when url_open fails */ - ret = h->prot->url_close(h); + if (h->prot->url_close) + ret = h->prot->url_close(h); av_free(h); return ret; }