<div dir="ltr">Dear,<div><br><div>I am afraid this or some other change in <span style="font-size:12.8000001907349px">modules/access/mms/mmsh.c or</span><span style="font-size:12.8000001907349px"> modules/demux/asf/asf.c</span></div><div><br></div><div><br></div></div><div>David Glaude</div></div><div class="gmail_extra"><br><div class="gmail_quote">2013-12-03 19:05 GMT+01:00 Francois Cartegnie <span dir="ltr"><<a href="mailto:fcvlcdev@free.fr" target="_blank">fcvlcdev@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
modules/access/mms/mmsh.c | 20 ++++++++++++++++++++<br>
modules/demux/asf/asf.c | 34 ++++++++++++++++++++++++++--------<br>
2 files changed, 46 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c<br>
index d354d28..414dfd4 100644<br>
--- a/modules/access/mms/mmsh.c<br>
+++ b/modules/access/mms/mmsh.c<br>
@@ -261,6 +261,26 @@ static int Control( access_t *p_access, int i_query, va_list args )<br>
*pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;<br>
break;<br>
<br>
+ case ACCESS_SET_PRIVATE_ID_STATE:<br>
+ i_int = (int)va_arg( args, int );<br>
+ b_bool = (bool)va_arg( args, int );<br>
+ if( (i_int < 0) || (i_int > 127) )<br>
+ return VLC_EGENERIC;<br>
+ else<br>
+ {<br>
+ int i_cat = p_sys->asfh.stream[i_int].i_cat;<br>
+ for ( int i=0; i< 128; i++ )<br>
+ {<br>
+ /* First unselect all streams from the same cat */<br>
+ if ( i_cat == p_sys->asfh.stream[i].i_cat )<br>
+ p_sys->asfh.stream[i].i_selected = false;<br>
+ }<br>
+ p_sys->asfh.stream[i_int].i_selected = true;<br>
+ Stop( p_access );<br>
+ Seek( p_access, p_access->info.i_pos );<br>
+ return VLC_SUCCESS;<br>
+ }<br>
+<br>
case ACCESS_SET_PAUSE_STATE:<br>
b_bool = (bool)va_arg( args, int );<br>
if( b_bool )<br>
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c<br>
index f169d37..bde94e6 100644<br>
--- a/modules/demux/asf/asf.c<br>
+++ b/modules/demux/asf/asf.c<br>
@@ -354,6 +354,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )<br>
demux_sys_t *p_sys = p_demux->p_sys;<br>
vlc_meta_t *p_meta;<br>
int64_t i64, *pi64;<br>
+ int i;<br>
double f, *pf;<br>
<br>
switch( i_query )<br>
@@ -388,6 +389,20 @@ static int Control( demux_t *p_demux, int i_query, va_list args )<br>
}<br>
return SeekPercent( p_demux, i_query, args );<br>
<br>
+ case DEMUX_SET_ES:<br>
+ {<br>
+ i = (int)va_arg( args, int );<br>
+ int i_ret = stream_Control( p_demux->s,<br>
+ STREAM_SET_PRIVATE_ID_STATE, i, true );<br>
+ if ( i_ret == VLC_SUCCESS )<br>
+ {<br>
+ SeekPrepare( p_demux );<br>
+ p_sys->i_seek_track = 0;<br>
+ WaitKeyframe( p_demux );<br>
+ }<br>
+ return i_ret;<br>
+ }<br>
+<br>
case DEMUX_GET_POSITION:<br>
if( p_sys->i_time < 0 ) return VLC_EGENERIC;<br>
if( p_sys->i_length > 0 )<br>
@@ -1003,15 +1018,18 @@ static int DemuxInit( demux_t *p_demux )<br>
tk->p_esp = NULL;<br>
tk->p_frame = NULL;<br>
<br>
- /* Check (in case of mms) if this track is selected (ie will receive data) */<br>
- if( !stream_Control( p_demux->s, STREAM_GET_PRIVATE_ID_STATE,<br>
- (int) p_sp->i_stream_number, &b_access_selected ) &&<br>
- !b_access_selected )<br>
+ if ( strncmp( p_demux->psz_access, "mms", 3 ) )<br>
{<br>
- tk->i_cat = UNKNOWN_ES;<br>
- msg_Dbg( p_demux, "ignoring not selected stream(ID:%u) (by access)",<br>
- p_sp->i_stream_number );<br>
- continue;<br>
+ /* Check (not mms) if this track is selected (ie will receive data) */<br>
+ if( !stream_Control( p_demux->s, STREAM_GET_PRIVATE_ID_STATE,<br>
+ (int) p_sp->i_stream_number, &b_access_selected ) &&<br>
+ !b_access_selected )<br>
+ {<br>
+ tk->i_cat = UNKNOWN_ES;<br>
+ msg_Dbg( p_demux, "ignoring not selected stream(ID:%u) (by access)",<br>
+ p_sp->i_stream_number );<br>
+ continue;<br>
+ }<br>
}<br>
<br>
/* Find the associated extended_stream_properties if any */<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
</font></span></blockquote></div><br></div>