summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_asf.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-11-06 13:25:18 -0300
committerJames Almer <jamrial@gmail.com>2017-11-06 16:25:32 -0300
commitf7c01ff24d706e2c7d645944227a5242e0f1203f (patch)
tree1a318ed2720bf1292d016aa118bb6516bd8b2fe5 /libavformat/rtpdec_asf.c
parenta6a6935ee8703f18fa21751ba291e003acd99ab8 (diff)
avformat/rtpdec_asf: free the buffer pointed by the AVIOContext
Don't free the buffer allocated in ff_wms_parse_sdp_a_line() after calling avformat_open_input(), as it may free it and replace it with another one. Should fix ticket #6808 Tested-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_asf.c')
-rw-r--r--libavformat/rtpdec_asf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 2c09fda10b..09f214a71c 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -139,12 +139,12 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
ret = avformat_open_input(&rt->asf_ctx, "", iformat, &opts);
av_dict_free(&opts);
if (ret < 0) {
- av_free(buf);
+ av_free(pb.buffer);
return ret;
}
av_dict_copy(&s->metadata, rt->asf_ctx->metadata, 0);
rt->asf_pb_pos = avio_tell(&pb);
- av_free(buf);
+ av_free(pb.buffer);
rt->asf_ctx->pb = NULL;
}
return ret;