From d6aa9e3ce643c82de8625ac8c02f13695a34e638 Mon Sep 17 00:00:00 2001 From: kingslay Date: Wed, 6 Dec 2023 19:05:15 +0800 Subject: [PATCH] #190 --- FFmpegKit | 2 +- .../KSPlayer/AVPlayer/MediaPlayerProtocol.swift | 16 ++++++++-------- Sources/KSPlayer/MEPlayer/Filter.swift | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/FFmpegKit b/FFmpegKit index dc07209a2..3070b3b74 160000 --- a/FFmpegKit +++ b/FFmpegKit @@ -1 +1 @@ -Subproject commit dc07209a216a0471c99ef18322e3bb67972075c6 +Subproject commit 3070b3b745b9184db3de2517c856c95f544e730b diff --git a/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift b/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift index e08aa2495..ae11427b4 100644 --- a/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift +++ b/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift @@ -142,14 +142,14 @@ public enum MediaLoadState: Int { // swiftlint:disable identifier_name public struct DOVIDecoderConfigurationRecord { - let dv_version_major: UInt8 - let dv_version_minor: UInt8 - let dv_profile: UInt8 - let dv_level: UInt8 - let rpu_present_flag: UInt8 - let el_present_flag: UInt8 - let bl_present_flag: UInt8 - let dv_bl_signal_compatibility_id: UInt8 + public let dv_version_major: UInt8 + public let dv_version_minor: UInt8 + public let dv_profile: UInt8 + public let dv_level: UInt8 + public let rpu_present_flag: UInt8 + public let el_present_flag: UInt8 + public let bl_present_flag: UInt8 + public let dv_bl_signal_compatibility_id: UInt8 } public enum FFmpegFieldOrder: UInt8 { diff --git a/Sources/KSPlayer/MEPlayer/Filter.swift b/Sources/KSPlayer/MEPlayer/Filter.swift index 8a38caa13..fba7e7ad2 100644 --- a/Sources/KSPlayer/MEPlayer/Filter.swift +++ b/Sources/KSPlayer/MEPlayer/Filter.swift @@ -132,14 +132,14 @@ class MEFilter { completionHandler(inputFrame) return } - var ret = av_buffersrc_add_frame_flags(bufferSrcContext, inputFrame, 0) - while ret == 0 { - ret = av_buffersink_get_frame_flags(bufferSinkContext, inputFrame, 0) - if ret == 0 { + let ret = av_buffersrc_add_frame_flags(bufferSrcContext, inputFrame, 0) + if ret < 0 { + return + } + while av_buffersink_get_frame_flags(bufferSinkContext, inputFrame, 0) >= 0 { // timebase = Timebase(av_buffersink_get_time_base(bufferSinkContext)) - completionHandler(inputFrame) - av_frame_unref(inputFrame) - } + completionHandler(inputFrame) +// av_frame_unref(inputFrame) } } }