aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-12-01 11:48:03 +0200
committerMartin Storsjö <martin@martin.st>2011-12-01 13:47:26 +0200
commit9c6777bd9367e8680bb7ada9852f5760dc8a8594 (patch)
tree5a0e8b52c0658053d96405cfa61a83a5f4916ace
parent02490bf3587d86a730e0de12572026504e2cb942 (diff)
downloadffmpeg-9c6777bd9367e8680bb7ada9852f5760dc8a8594.tar.gz
mmsh: Properly clean up if the second ffurl_alloc failed
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/mmsh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 8a6de322cf..3761016f81 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -262,9 +262,9 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
// close the socket and then reopen it for sending the second play request.
ffurl_close(mms->mms_hd);
memset(headers, 0, sizeof(headers));
- if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ,
- &h->interrupt_callback) < 0) {
- return AVERROR(EIO);
+ if ((err = ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ,
+ &h->interrupt_callback)) < 0) {
+ goto fail;
}
stream_selection = av_mallocz(mms->stream_num * 19 + 1);
if (!stream_selection)