X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=httpd.cpp;h=689291e2c7628644f4f4b4ee5aa9c94cb870264d;hb=236cdb59df3518222cca245434602cdd6fdeca47;hp=a841cd0bb7311526ce0177d5c40f199cdbc47e03;hpb=bd6cb62456225064229a871735ad99ed5c44a671;p=nageru diff --git a/httpd.cpp b/httpd.cpp index a841cd0..689291e 100644 --- a/httpd.cpp +++ b/httpd.cpp @@ -127,7 +127,12 @@ HTTPD::Mux::Mux(AVFormatContext *avctx, int width, int height) avstream_audio->codec->channel_layout = AV_CH_LAYOUT_STEREO; avstream_audio->codec->time_base = AVRational{1, TIMEBASE}; - if (avformat_write_header(avctx, NULL) < 0) { + AVDictionary *options = NULL; + vector> opts = MUX_OPTS; + for (pair opt : opts) { + av_dict_set(&options, opt.first.c_str(), opt.second.c_str(), 0); + } + if (avformat_write_header(avctx, &options) < 0) { fprintf(stderr, "avformat_write_header() failed\n"); exit(1); }