]> git.sesse.net Git - nageru/commitdiff
In Futatabi, ignore non-video streams for now.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 27 Mar 2019 22:15:54 +0000 (23:15 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 27 Mar 2019 22:15:54 +0000 (23:15 +0100)
futatabi/main.cpp

index 6dc50649c2c22d723f3e01b46686e95c694e844f..4c54d332d24951b9118798b86c90ef3ab10e464b 100644 (file)
@@ -502,7 +502,8 @@ void record_thread_func()
                        if (av_read_frame(format_ctx.get(), &pkt) != 0) {
                                break;
                        }
-                       if (pkt.stream_index >= MAX_STREAMS) {
+                       if (pkt.stream_index >= MAX_STREAMS ||
+                           format_ctx->streams[pkt.stream_index]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) {
                                continue;
                        }