Commit 00b67afd authored by Francois Cartegnie's avatar Francois Cartegnie

access: mmstu: missing stream selection

parent 7fa7f22f
......@@ -44,6 +44,7 @@
#include <vlc_network.h>
#include <vlc_url.h>
#include <vlc_interrupt.h>
#include <vlc_es.h>
#include "asf.h"
#include "buffer.h"
......@@ -267,6 +268,43 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;
break;
case ACCESS_SET_PRIVATE_ID_STATE:
{
i_int = (int)va_arg( args, int );
b_bool = (bool)va_arg( args, int );
int i_cat;
if( i_int > 127 )
return VLC_EGENERIC;
else if ( i_int < 0 )
{
/* Deselecting all ES in this category */
assert( !b_bool );
i_cat = -1 * i_int;
if ( i_cat > ES_CATEGORY_COUNT )
return VLC_EGENERIC;
}
else
{
/* Chose another ES */
assert( b_bool );
i_cat = p_sys->asfh.stream[i_int].i_cat;
}
for ( int i=0; i< 128; i++ )
{
/* First unselect all streams from the same cat */
if ( i_cat == p_sys->asfh.stream[i].i_cat )
p_sys->asfh.stream[i].i_selected = false;
}
if ( i_int > 0 )
p_sys->asfh.stream[i_int].i_selected = true;
MMSStop( p_access );
Seek( p_access, p_sys->i_position );
return VLC_SUCCESS;
}
case ACCESS_SET_PAUSE_STATE:
b_bool = (bool)va_arg( args, int );
if( b_bool )
......
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