diff --git a/src/video_core/host1x/ffmpeg.cpp b/src/video_core/host1x/ffmpeg.cpp index b51db95145..ed39410f1f 100644 --- a/src/video_core/host1x/ffmpeg.cpp +++ b/src/video_core/host1x/ffmpeg.cpp @@ -87,7 +87,7 @@ std::string AVError(int errnum) { return errbuf; } -#ifdef ANDROID +#ifdef __ANDROID__ // Match a 3- or 4-byte annex-B start code at `i`. Returns its length, or 0. size_t MatchStartCode(std::span data, size_t i) { const size_t n = data.size(); @@ -173,7 +173,7 @@ Decoder::Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec) { } }(); -#ifdef ANDROID +#ifdef __ANDROID__ // FFmpeg exposes MediaCodec via dedicated decoders rather than as a // hw_config on the regular ones. if (Settings::values.nvdec_emulation.GetValue() == Settings::NvdecEmulation::Gpu) { @@ -388,7 +388,7 @@ bool DecodeApi::Initialize(Tegra::Host1x::NvdecCommon::VideoCodec codec) { m_hardware_context->InitializeForDecoder(*m_decoder_context, *m_decoder); } -#ifdef ANDROID +#ifdef __ANDROID__ // h264_mediacodec needs SPS/PPS in extradata at open. We pull them from // the first frame's bitstream in SendPacket. m_needs_h264_extradata = m_decoder->GetCodec() && @@ -411,7 +411,7 @@ bool DecodeApi::SendPacket(std::span packet_data, const FrameOffsets& std::optional dimensions) { if (!m_opened) { std::vector extradata; -#ifdef ANDROID +#ifdef __ANDROID__ if (m_needs_h264_extradata) { extradata = ExtractH264AnnexBExtradata(packet_data); if (extradata.empty()) {