diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-11-16 00:14:48 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-11-16 00:14:48 +0000 |
commit | 7a813b368ac810bb39838854572e300bbda5b799 (patch) | |
tree | 77df1ec685e6c36c6e453312b91d15a34ad2461f /libavformat/avio.c | |
parent | 018b6fb465814f63ef06044283813e971fa40c2b (diff) | |
download | ffmpeg-7a813b368ac810bb39838854572e300bbda5b799.tar.gz |
Call prot->url_close only if it is present.
Originally committed as revision 11044 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 177e91d735..793f8ab1f4 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -132,10 +132,11 @@ offset_t url_seek(URLContext *h, offset_t pos, int whence) 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; } |