[FFmpeg-cvslog] avformat/libquvi: Set default demuxer and protocol limitations

Michael Niedermayer git at videolan.org
Thu Jan 28 16:11:49 CET 2016


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 20 15:25:32 2016 +0100| [736e42bc33ec80bb04eb00a9e26287a2d65f4ea5] | committer: Michael Niedermayer

avformat/libquvi: Set default demuxer and protocol limitations

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 15cc98a0f38ac45444d177186cfbf28e14bd5f1f)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=736e42bc33ec80bb04eb00a9e26287a2d65f4ea5
---

 libavformat/libquvi.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c
index 7151694..1e5c8bc 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;



More information about the ffmpeg-cvslog mailing list