Commit 42a16215 authored by Felix Paul Kühne's avatar Felix Paul Kühne

osx/framework: don't interfere with the NSCell API and fail gracefully if...

osx/framework: don't interfere with the NSCell API and fail gracefully if pausing throws an exception
parent 8fe7e00b
...@@ -433,7 +433,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -433,7 +433,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception( &ex ); catch_exception( &ex );
} }
- (int)chapter - (int)currentChapter
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
...@@ -475,7 +475,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -475,7 +475,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception( &ex ); catch_exception( &ex );
} }
- (int)title - (int)currentTitle
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
...@@ -583,7 +583,13 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -583,7 +583,13 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
libvlc_media_player_pause( (libvlc_media_player_t *)instance, &ex ); libvlc_media_player_pause( (libvlc_media_player_t *)instance, &ex );
catch_exception( &ex );
// fail gracefully
// in most cases, it's just EOF so let's stop
if (libvlc_exception_raised(&ex))
[self stop];
libvlc_exception_clear(&ex);
} }
- (void)stop - (void)stop
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment