Search code examples
iosios9core-video

Incompatible pointer types initializing 'AVAssetReaderTrackOutput *__strong' with an expression of type 'AVAssetReaderOutput *'


As I upgraded to Xcode 7, working code is now erroring out:

AVAssetReaderTrackOutput *output = [_assetReader.outputs objectAtIndex:0];

Isn't AVAssetReaderTrackOutput a subclass of AVAssetReaderOutput any more?


Solution

  • It seems the fix was explicitly casting the object to the subclass.

    AVAssetReaderTrackOutput *output = (AVAssetReaderTrackOutput*)[_assetReader.outputs objectAtIndex:0];