summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-20 15:25:32 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-23 00:12:54 +0100
commit15cc98a0f38ac45444d177186cfbf28e14bd5f1f (patch)
tree30a6c30d99b2c62b0d30e098b1816e2cf90a481d /libavformat
parent8e32d014322eada1812af268d7ea9d53169d279c (diff)
avformat/libquvi: Set default demuxer and protocol limitations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/libquvi.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c
index 7151694542..1e5c8bc525 100644
--- a/libavformat/libquvi.c
+++ b/libavformat/libquvi.c
@@ -95,6 +95,20 @@ static int libquvi_read_header(AVFormatContext *s)
goto err_quvi_cleanup;
}
+ if (!qc->fmtctx->format_whitelist) {
+ qc->fmtctx->format_whitelist = av_strdup("avi,asf,flv,mov,mpeg,mpegts,aac,h264,hevc,mp3,ogg,matroska,mxf,mp2");
+ if (!qc->fmtctx->format_whitelist) {
+ avformat_free_context(qc->fmtctx);
+ qc->fmtctx = NULL;
+ goto err_quvi_cleanup;
+ }
+ }
+ if (strncmp(media_url, "http:", 5) && strncmp(media_url, "https:", 6)) {
+ avformat_free_context(qc->fmtctx);
+ qc->fmtctx = NULL;
+ goto err_quvi_cleanup;
+ }
+
ret = avformat_open_input(&qc->fmtctx, media_url, NULL, NULL);
if (ret < 0)
goto err_quvi_cleanup;