]> git.sesse.net Git - nageru/blobdiff - nageru/mjpeg_encoder.cpp
Add an option to control the mapping of streams to export to MJPEG (or turn it off...
[nageru] / nageru / mjpeg_encoder.cpp
index 07deae02289a3c321a6a4c58c036a8c96109ccb8..d82107feb4654f8d5c6accadc1b1a6787b22bbd6 100644 (file)
@@ -132,7 +132,7 @@ MJPEGEncoder::MJPEGEncoder(HTTPD *httpd, const string &va_display)
        avctx->pb->write_data_type = &MJPEGEncoder::write_packet2_thunk;
        avctx->flags = AVFMT_FLAG_CUSTOM_IO;
 
-       for (int card_idx = 0; card_idx < global_flags.num_cards; ++card_idx) {
+       for (unsigned card_idx = 0; card_idx < global_flags.card_to_mjpeg_stream_export.size(); ++card_idx) {
                AVStream *stream = avformat_new_stream(avctx.get(), nullptr);
                if (stream == nullptr) {
                        fprintf(stderr, "avformat_new_stream() failed\n");