Changeset c25f5114ce35167be8cc4112dda08a189dfc24e9
- Timestamp:
- 04/04/08 13:33:19
(5 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1207308799 +0200
- git-parent:
[3aa3031d6ec7ddc439115480810f96a973a285fa]
- git-author:
- Tanguy Krotoff <tkrotoff@gmail.com> 1207059842 +0200
- Message:
libvlc: check if we are in the proper state before to send libvlc_MediaPlayerStopped
Signed-off-by: Pierre d'Herbemont <pdherbemont@videolan.org>
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r313a874 |
rc25f511 |
|
| 628 | 628 | libvlc_exception_t *p_e ) |
|---|
| 629 | 629 | { |
|---|
| | 630 | input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e ); |
|---|
| | 631 | |
|---|
| | 632 | if( !p_input_thread ) |
|---|
| | 633 | return; |
|---|
| | 634 | |
|---|
| | 635 | int state = var_GetInteger( p_input_thread, "state" ); |
|---|
| | 636 | |
|---|
| 630 | 637 | if( p_mi->b_own_its_input_thread ) |
|---|
| 631 | 638 | { |
|---|
| … | … | |
| 636 | 643 | else |
|---|
| 637 | 644 | { |
|---|
| 638 | | input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e ); |
|---|
| 639 | | |
|---|
| 640 | | if( !p_input_thread ) |
|---|
| 641 | | return; |
|---|
| 642 | | |
|---|
| 643 | 645 | input_StopThread( p_input_thread ); |
|---|
| 644 | 646 | vlc_object_release( p_input_thread ); |
|---|
| 645 | 647 | } |
|---|
| 646 | 648 | |
|---|
| 647 | | /* Send a stop notification event */ |
|---|
| 648 | | libvlc_event_t event; |
|---|
| 649 | | libvlc_media_set_state( p_mi->p_md, libvlc_Stopped, NULL); |
|---|
| 650 | | event.type = libvlc_MediaPlayerStopped; |
|---|
| 651 | | libvlc_event_send( p_mi->p_event_manager, &event ); |
|---|
| | 649 | if( state == PLAYING_S || state == PAUSE_S ) |
|---|
| | 650 | { |
|---|
| | 651 | /* Send a stop notification event */ |
|---|
| | 652 | libvlc_event_t event; |
|---|
| | 653 | libvlc_media_set_state( p_mi->p_md, libvlc_Stopped, NULL ); |
|---|
| | 654 | event.type = libvlc_MediaPlayerStopped; |
|---|
| | 655 | libvlc_event_send( p_mi->p_event_manager, &event ); |
|---|
| | 656 | } |
|---|
| 652 | 657 | } |
|---|
| 653 | 658 | |
|---|