Revert "Make h264bitstream dependency optional"

This reverts commit 2328713f4e.
This commit is contained in:
Cameron Gutman
2026-07-26 19:23:34 -05:00
parent b7adc70ea4
commit acea86de24
3 changed files with 4 additions and 21 deletions
-3
View File
@@ -448,9 +448,6 @@ wayland {
SOURCES += streaming/video/ffmpeg-renderers/pacer/waylandvsyncsource.cpp
HEADERS += streaming/video/ffmpeg-renderers/pacer/waylandvsyncsource.h
}
!disable-h264bitstream {
DEFINES += HAVE_H264BITSTREAM
}
RESOURCES += \
resources.qrc \
+1 -11
View File
@@ -3,9 +3,7 @@
#include "utils.h"
#include "streaming/session.h"
#ifdef HAVE_H264BITSTREAM
#include <h264_stream.h>
#endif
extern "C" {
#include <libavutil/mastering_display_metadata.h>
@@ -717,13 +715,8 @@ bool FFmpegVideoDecoder::completeInitialization(const AVCodec* decoder, enum AVP
if (testMode != TestMode::TestFrameOnly) {
if ((params->videoFormat & VIDEO_FORMAT_MASK_H264) &&
!(m_BackendRenderer->getDecoderCapabilities() & CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC)) {
#ifdef HAVE_H264BITSTREAM
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using H.264 SPS fixup");
#else
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"H.264 SPS fixup cannot be performed without h264bitstream. H.264 may have excessive decoding latency!");
#endif
m_NeedsSpsFixup = true;
}
else {
@@ -1765,7 +1758,6 @@ bool FFmpegVideoDecoder::initialize(PDECODER_PARAMETERS params)
void FFmpegVideoDecoder::writeBuffer(PLENTRY entry, int& offset)
{
#ifdef HAVE_H264BITSTREAM
if (m_NeedsSpsFixup && entry->bufferType == BUFFER_TYPE_SPS) {
h264_stream_t* stream = h264_new();
int nalStart, nalEnd;
@@ -1820,9 +1812,7 @@ void FFmpegVideoDecoder::writeBuffer(PLENTRY entry, int& offset)
h264_free(stream);
}
else
#endif
{
else {
// Write the buffer as-is
memcpy(&m_DecodeBuffer.data()[offset],
entry->data,