spacing and NULL=>nullptr

This commit is contained in:
Isaac Connor 2021-01-07 09:36:54 -05:00
parent f842e9e2ed
commit 824cbb7879
1 changed files with 3 additions and 3 deletions

View File

@ -2255,19 +2255,19 @@ int LocalCamera::PostCapture() {
AVStream *LocalCamera::get_VideoStream() { AVStream *LocalCamera::get_VideoStream() {
if ( ! video_stream ) { if ( ! video_stream ) {
AVFormatContext *oc = avformat_alloc_context(); AVFormatContext *oc = avformat_alloc_context();
video_stream = avformat_new_stream( oc, NULL ); video_stream = avformat_new_stream(oc, nullptr);
if ( video_stream ) { if ( video_stream ) {
video_stream->time_base = (AVRational){1, 1000000}; // microseconds as base frame rate video_stream->time_base = (AVRational){1, 1000000}; // microseconds as base frame rate
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) #if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
video_stream->codecpar->width = width; video_stream->codecpar->width = width;
video_stream->codecpar->height = height; video_stream->codecpar->height = height;
video_stream->codecpar->format = GetFFMPEGPixelFormat(colours,subpixelorder); video_stream->codecpar->format = GetFFMPEGPixelFormat(colours, subpixelorder);
video_stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; video_stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
video_stream->codecpar->codec_id = AV_CODEC_ID_NONE; video_stream->codecpar->codec_id = AV_CODEC_ID_NONE;
#else #else
video_stream->codec->width = width; video_stream->codec->width = width;
video_stream->codec->height = height; video_stream->codec->height = height;
video_stream->codec->pix_fmt = GetFFMPEGPixelFormat(colours,subpixelorder); video_stream->codec->pix_fmt = GetFFMPEGPixelFormat(colours, subpixelorder);
video_stream->codec->codec_type = AVMEDIA_TYPE_VIDEO; video_stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
video_stream->codec->codec_id = AV_CODEC_ID_NONE; video_stream->codec->codec_id = AV_CODEC_ID_NONE;
#endif #endif