subtitlecomposer/0008-StreamProcessor-stop-using-pkt_duration.patch
Christophe Marin 7e2072f1f1 - Add patch to fix build with pocketsphinx 5.0.3 in TW since
the API changed in the 5.0.0 release. Also, removed some
  parameters that don't seem to be configurable by pocketsphinx
  anymore:
  * use-pocketsphinx-5.0.0-api.patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/subtitlecomposer?expand=0&rev=47
2024-12-24 11:58:10 +00:00

29 lines
1.2 KiB
Diff

From 7959dcc03a3943f551b21bbfeba97e8ae1e3814a Mon Sep 17 00:00:00 2001
From: Mladen Milinkovic <maxrd2@smoothware.net>
Date: Thu, 1 Aug 2024 10:51:08 +0200
Subject: [PATCH 08/11] StreamProcessor: stop using pkt_duration
Fixes compilation with FFmpeg6
---
src/streamprocessor/streamprocessor.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
index aa27a66e..b30c9631 100644
--- a/src/streamprocessor/streamprocessor.cpp
+++ b/src/streamprocessor/streamprocessor.cpp
@@ -447,8 +447,8 @@ StreamProcessor::processAudio()
timeFrameDuration = frameResampled->nb_samples * 1000 / frameResampled->sample_rate;
} else {
frameSize = frame->nb_samples * av_get_bytes_per_sample(static_cast<AVSampleFormat>(frame->format));
- if(frame->pkt_duration)
- timeFrameDuration = frame->pkt_duration * 1000 * m_avStream->time_base.num / m_avStream->time_base.den;
+ if(frame->duration)
+ timeFrameDuration = frame->duration * 1000 * m_avStream->time_base.num / m_avStream->time_base.den;
}
timeFrameEnd = timeFrameStart + timeFrameDuration;
--
2.46.0