From 79736a6266ed8cc60e958ece1a16cb26c835bcb8 Mon Sep 17 00:00:00 2001 From: Single Date: Wed, 30 Oct 2019 11:40:09 +0800 Subject: [PATCH] SGTracks: Infos. --- SGPlayer/Classes/Core/SGAsset/SGMutableTrack.m | 11 ++++++++--- SGPlayer/Classes/Core/SGAsset/SGTrack+Internal.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SGPlayer/Classes/Core/SGAsset/SGMutableTrack.m b/SGPlayer/Classes/Core/SGAsset/SGMutableTrack.m index e2071ca7..7b685011 100644 --- a/SGPlayer/Classes/Core/SGAsset/SGMutableTrack.m +++ b/SGPlayer/Classes/Core/SGAsset/SGMutableTrack.m @@ -37,13 +37,18 @@ - (instancetype)initWithType:(SGMediaType)type index:(NSInteger)index - (void *)coreptr { - void *ret = [super coreptr]; + return [self core]; +} + +- (AVStream *)core +{ + void *ret = [super core]; if (ret) { return ret; } for (SGTrack *obj in self->_subTracks) { - if (obj.coreptr) { - ret = obj.coreptr; + if (obj.core) { + ret = obj.core; break; } } diff --git a/SGPlayer/Classes/Core/SGAsset/SGTrack+Internal.h b/SGPlayer/Classes/Core/SGAsset/SGTrack+Internal.h index 2be125ef..69e3124e 100644 --- a/SGPlayer/Classes/Core/SGAsset/SGTrack+Internal.h +++ b/SGPlayer/Classes/Core/SGAsset/SGTrack+Internal.h @@ -7,8 +7,8 @@ // #import "SGTrack.h" +#import "SGFFmpeg.h" #import "SGMutableTrack.h" -#import "avformat.h" @interface SGTrack ()