From e284d1c7a2e18ee7e4aea082c4a57a3504a0f5e8 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 24 Mar 2018 17:31:57 +0100 Subject: [PATCH] Fix some compiler warnings. --- json.proto | 2 ++ mixer.cpp | 2 ++ quicksync_encoder.cpp | 10 +++------- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/json.proto b/json.proto index ae10a7f..55e642a 100644 --- a/json.proto +++ b/json.proto @@ -1,6 +1,8 @@ // Messages used to produce JSON (it's the simplest way we can create valid // JSON without pulling in an external JSON library). +syntax = "proto2"; + message Channels { repeated Channel channel = 1; } diff --git a/mixer.cpp b/mixer.cpp index b3e95a7..0b4a8fe 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -157,6 +157,8 @@ void ensure_texture_resolution(PBOFrameAllocator::Userdata *userdata, unsigned f } check_error(); break; + default: + assert(false); } userdata->last_width[field] = width; userdata->last_height[field] = height; diff --git a/quicksync_encoder.cpp b/quicksync_encoder.cpp index 8761d56..068e2d4 100644 --- a/quicksync_encoder.cpp +++ b/quicksync_encoder.cpp @@ -82,6 +82,7 @@ std::atomic metric_quick_sync_stalled_frames{0}; exit(1); \ } +#undef BUFFER_OFFSET #define BUFFER_OFFSET(i) ((char *)NULL + (i)) //#include "loadsurface.h" @@ -763,7 +764,7 @@ void QuickSyncEncoderImpl::va_close_display(VADisplay va_dpy) int QuickSyncEncoderImpl::init_va(const string &va_display) { - VAProfile profile_list[]={VAProfileH264High, VAProfileH264Main, VAProfileH264Baseline, VAProfileH264ConstrainedBaseline}; + VAProfile profile_list[]={VAProfileH264High, VAProfileH264Main, VAProfileH264ConstrainedBaseline}; VAEntrypoint *entrypoints; int num_entrypoints, slice_entrypoint; int support_encode = 0; @@ -806,11 +807,6 @@ int QuickSyncEncoderImpl::init_va(const string &va_display) exit(1); } else { switch (h264_profile) { - case VAProfileH264Baseline: - ip_period = 1; - constraint_set_flag |= (1 << 0); /* Annex A.2.1 */ - h264_entropy_mode = 0; - break; case VAProfileH264ConstrainedBaseline: constraint_set_flag |= (1 << 0 | 1 << 1); /* Annex A.2.2 */ ip_period = 1; @@ -824,7 +820,7 @@ int QuickSyncEncoderImpl::init_va(const string &va_display) constraint_set_flag |= (1 << 3); /* Annex A.2.4 */ break; default: - h264_profile = VAProfileH264Baseline; + h264_profile = VAProfileH264ConstrainedBaseline; ip_period = 1; constraint_set_flag |= (1 << 0); /* Annex A.2.1 */ break; -- 2.39.2