X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Frtpdec_asf.c;h=44c0a243bd06e4f12d52125c29a429f16183380d;hp=8e196545de9861b480ce69c3d57bdbbf3648a147;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/rtpdec_asf.c b/ffmpeg/libavformat/rtpdec_asf.c index 8e19654..44c0a24 100644 --- a/ffmpeg/libavformat/rtpdec_asf.c +++ b/ffmpeg/libavformat/rtpdec_asf.c @@ -25,6 +25,7 @@ * @author Ronald S. Bultje */ +#include "libavutil/avassert.h" #include "libavutil/base64.h" #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" @@ -102,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) @@ -111,11 +114,19 @@ 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; av_dict_set(&opts, "no_resync_search", "1", 0); - ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, &opts); + + if ((ret = ff_copy_whitelists(rt->asf_ctx, s)) < 0) { + av_dict_free(&opts); + return ret; + } + + ret = avformat_open_input(&rt->asf_ctx, "", iformat, &opts); av_dict_free(&opts); if (ret < 0) return ret;