aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_asf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-25 16:28:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-25 16:28:03 +0200
commit2ce10542570d8be7a74a94cb03b2f182e2cb5ff8 (patch)
treec3360698a1889c3dab4eede571ab446da17c3097 /libavformat/rtpdec_asf.c
parent39a7ded22df3f0bae46706800da6eeede744c14f (diff)
downloadffmpeg-2ce10542570d8be7a74a94cb03b2f182e2cb5ff8.tar.gz
avformat/rtpdec_asf: Use av_find_input_format() instead of directly linking to the demuxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_asf.c')
-rw-r--r--libavformat/rtpdec_asf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 8fd2e24afe..44c0a243bd 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -103,6 +103,8 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
AVDictionary *opts = NULL;
int len = strlen(p) * 6 / 8;
char *buf = av_mallocz(len);
+ AVInputFormat *iformat;
+
av_base64_decode(buf, p, len);
if (rtp_asf_fix_header(buf, len) < 0)
@@ -112,6 +114,8 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
if (rt->asf_ctx) {
avformat_close_input(&rt->asf_ctx);
}
+ if (!(iformat = av_find_input_format("asf")))
+ return AVERROR_DEMUXER_NOT_FOUND;
if (!(rt->asf_ctx = avformat_alloc_context()))
return AVERROR(ENOMEM);
rt->asf_ctx->pb = &pb;
@@ -122,7 +126,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
return ret;
}
- ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, &opts);
+ ret = avformat_open_input(&rt->asf_ctx, "", iformat, &opts);
av_dict_free(&opts);
if (ret < 0)
return ret;