From 7959dcc03a3943f551b21bbfeba97e8ae1e3814a Mon Sep 17 00:00:00 2001 From: Mladen Milinkovic 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(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