mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
573a7b4c67
commit
197c0f618a
@ -95,6 +95,20 @@ static int libquvi_read_header(AVFormatContext *s)
|
|||||||
goto err_quvi_cleanup;
|
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);
|
ret = avformat_open_input(&qc->fmtctx, media_url, NULL, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err_quvi_cleanup;
|
goto err_quvi_cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user