Commit 3bb83fd0 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/libquvi: Set default demuxer and protocol limitations

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15cc98a0)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a967e551
...@@ -79,6 +79,20 @@ static int libquvi_read_header(AVFormatContext *s) ...@@ -79,6 +79,20 @@ static int libquvi_read_header(AVFormatContext *s)
if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0) if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0)
goto end; 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); ret = avformat_open_input(&qc->fmtctx, media_url, NULL, NULL);
if (ret < 0) if (ret < 0)
goto end; goto end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment