[vlc-devel] commit: Keep p_input->i_state when adding a subtitle on the fly. This prevents i_state from being changed to BUFFERING_S ( which would in turn prevent the input from being paused). This should close #1904. (Should be backported in 0.8. 6 if we keep that branch) (Antoine Cellerier )

git version control git at videolan.org
Sat Aug 23 16:33:11 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Aug 23 16:33:54 2008 +0200| [1e6d10864e1887856f6bf0e9e59b7603a52f9b79] | committer: Antoine Cellerier 

Keep p_input->i_state when adding a subtitle on the fly. This prevents i_state from being changed to BUFFERING_S (which would in turn prevent the input from being paused). This should close #1904. (Should be backported in 0.8.6 if we keep that branch)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e6d10864e1887856f6bf0e9e59b7603a52f9b79
---

 src/input/input.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 971284b..89f5216 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2813,6 +2813,8 @@ bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
     vlc_value_t list;
     char *psz_path, *psz_extension;
 
+    int i_state = p_input->i_state;
+
     if( b_check_extension && !subtitles_Filter( psz_subtitle ) )
     {
         return false;
@@ -2862,6 +2864,7 @@ bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
             }
             var_Change( p_input, "spu-es", VLC_VAR_FREELIST, &list, NULL );
         }
+        input_ChangeState( p_input, i_state );
     }
     else free( sub );
 




More information about the vlc-devel mailing list