Skip to content

Commit b8d6f0b

Browse files
committed
[[ PlayerPanning ]] Fix crash due to overrelease of m_player_item_video_output
1 parent ea1ff81 commit b8d6f0b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

engine/src/mac-av-player.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ - (void)setPlayer:(AVPlayer *)player
365365

366366
// Finally we can release the player.
367367
[m_player release];
368+
369+
// Release the video output
370+
[m_player_item_video_output release];
368371

369372
MCMemoryDeleteArray(m_markers);
370373

@@ -727,7 +730,7 @@ - (void)setPlayer:(AVPlayer *)player
727730

728731
NSDictionary* t_settings = @{ (id)kCVPixelBufferPixelFormatTypeKey : [NSNumber numberWithInt:kCVPixelFormatType_32ARGB] };
729732
// AVPlayerItemVideoOutput is available in OSX version >= 10.8
730-
m_player_item_video_output = [[[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:t_settings] autorelease];;
733+
m_player_item_video_output = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:t_settings];;
731734

732735
// Now set the player of the view.
733736
[m_view setPlayer: m_player];

0 commit comments

Comments
 (0)