aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-17 22:03:36 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-07 21:32:19 +0200
commit430ef8a7166b47666d45f180c33b2515cf555933 (patch)
tree56022dc864c9f1ac6d1d385b4b0fed38cb51d516
parent627772d9886f1a766c73dc161710c54de07bfdd3 (diff)
downloadffmpeg-430ef8a7166b47666d45f180c33b2515cf555933.tar.gz
mmsh: dont close context on seeking failure
Fixes Ticket2581 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit b4579a29c75e2968ede2ad002dd4a495dbfc883d)
-rw-r--r--libavformat/mmsh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 86a0575e59..d5d2f0c171 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -309,14 +309,16 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
return 0;
fail:
av_freep(&stream_selection);
- mmsh_close(h);
av_dlog(NULL, "Connection failed with error %d\n", err);
return err;
}
static int mmsh_open(URLContext *h, const char *uri, int flags)
{
- return mmsh_open_internal(h, uri, flags, 0, 0);
+ int ret = mmsh_open_internal(h, uri, flags, 0, 0);
+ if (ret < 0)
+ mmsh_close(h);
+ return ret;
}
static int handle_chunk_type(MMSHContext *mmsh)