mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix video track selection in all places
This commit is contained in:
parent
552c518f36
commit
67ab9a84fb
@ -164,7 +164,7 @@
|
|||||||
return [_originalAsset originalSize];
|
return [_originalAsset originalSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
AVAssetTrack *track = _cachedAVAsset.tracks.firstObject;
|
AVAssetTrack *track = [_cachedAVAsset tracksWithMediaType:AVMediaTypeVideo].firstObject;
|
||||||
_cachedSize = CGRectApplyAffineTransform((CGRect){ CGPointZero, track.naturalSize }, track.preferredTransform).size;
|
_cachedSize = CGRectApplyAffineTransform((CGRect){ CGPointZero, track.naturalSize }, track.preferredTransform).size;
|
||||||
return _cachedSize;
|
return _cachedSize;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@
|
|||||||
{
|
{
|
||||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
return [[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||||
{
|
{
|
||||||
AVAssetTrack *track = avAsset.tracks.firstObject;
|
AVAssetTrack *track = [avAsset tracksWithMediaType:AVMediaTypeVideo].firstObject;
|
||||||
if (track == nil)
|
if (track == nil)
|
||||||
{
|
{
|
||||||
[subscriber putError:nil];
|
[subscriber putError:nil];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user