X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fvideo_stream.cpp;h=1957d8410d7a514618a9e51ad345ee933724d9ee;hb=1832a337468b13b513d3e77c32cca6207764bd23;hp=6fb8c5c400589a93fc811823421b499c12a8b7cf;hpb=bb709f382e8b7a5a8856c4ff736c6106c9e1f3e7;p=nageru diff --git a/futatabi/video_stream.cpp b/futatabi/video_stream.cpp index 6fb8c5c..1957d84 100644 --- a/futatabi/video_stream.cpp +++ b/futatabi/video_stream.cpp @@ -238,7 +238,12 @@ VideoStream::~VideoStream() {} void VideoStream::start() { AVFormatContext *avctx = avformat_alloc_context(); - avctx->oformat = av_guess_format("nut", nullptr, nullptr); + + // We use Matroska, because it's pretty much the only mux where FFmpeg + // allows writing chroma location to override JFIF's default center placement. + // (Note that at the time of writing, however, FFmpeg does not correctly + // _read_ this information!) + avctx->oformat = av_guess_format("matroska", nullptr, nullptr); uint8_t *buf = (uint8_t *)av_malloc(MUX_BUFFER_SIZE); avctx->pb = avio_alloc_context(buf, MUX_BUFFER_SIZE, 1, this, nullptr, nullptr, nullptr);