diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-20 15:25:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-31 00:24:28 +0100 |
commit | 3bb83fd0336908faee1799a1ee29d6c5a9980566 (patch) | |
tree | 2e3ce5453421698f0e9402f44fd73d045c0655b3 | |
parent | a967e551571797ace8d973a215eae0db2f1718ac (diff) | |
download | ffmpeg-3bb83fd0336908faee1799a1ee29d6c5a9980566.tar.gz |
avformat/libquvi: Set default demuxer and protocol limitations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15cc98a0f38ac45444d177186cfbf28e14bd5f1f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/libquvi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c index 0a593cc9cf..9d47692f8b 100644 --- a/libavformat/libquvi.c +++ b/libavformat/libquvi.c @@ -79,6 +79,20 @@ static int libquvi_read_header(AVFormatContext *s) if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0) goto end; + 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 end; |