X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=kaeru.cpp;h=10f1e9394b2a5c0ddab4e42a226b0ff7af4ccc73;hb=6ffaabac0a523617b686f40c154a25cb548cc561;hp=1bfd2e6db5232d508ff1fda08276768247ea3118;hpb=aa3a1c2b697b22f5ed9a96f86441fd6f980a7f34;p=nageru diff --git a/kaeru.cpp b/kaeru.cpp index 1bfd2e6..10f1e93 100644 --- a/kaeru.cpp +++ b/kaeru.cpp @@ -47,9 +47,9 @@ int write_packet(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType ty if (type == AVIO_DATA_MARKER_HEADER) { stream_mux_header.append((char *)buf, buf_size); - httpd->set_header(HTTPD::MAIN_STREAM, stream_mux_header); + httpd->set_header(stream_mux_header); } else { - httpd->add_data(HTTPD::MAIN_STREAM, (char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); + httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); } return buf_size; } @@ -171,7 +171,9 @@ int main(int argc, char *argv[]) } global_flags.num_cards = 1; // For latency metrics. +#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100) av_register_all(); +#endif avformat_network_init(); HTTPD httpd;