[FFmpeg-cvslog] mmsh: dont close context on seeking failure
Michael Niedermayer
git at videolan.org
Sun Jul 7 21:49:30 CEST 2013
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 17 22:03:36 2013 +0200| [ce74b92c0981663754a5bf5edad59f9d2ea91e3d] | committer: Carl Eugen Hoyos
mmsh: dont close context on seeking failure
Fixes Ticket2581
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b4579a29c75e2968ede2ad002dd4a495dbfc883d)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce74b92c0981663754a5bf5edad59f9d2ea91e3d
---
libavformat/mmsh.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 86a0575..d5d2f0c 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)
More information about the ffmpeg-cvslog
mailing list