Commit 49dba5c2 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix issues with the VLC rawvid demux and bump it's priority.

parent ab620e32
...@@ -62,7 +62,7 @@ static void Close( vlc_object_t * ); ...@@ -62,7 +62,7 @@ static void Close( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_shortname( "Raw Video" ); set_shortname( "Raw Video" );
set_description( _("Raw video demuxer") ); set_description( _("Raw video demuxer") );
set_capability( "demux2", 3 ); set_capability( "demux2", 10 );
set_category( CAT_INPUT ); set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX ); set_subcategory( SUBCAT_INPUT_DEMUX );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
...@@ -184,13 +184,13 @@ static int Open( vlc_object_t * p_this ) ...@@ -184,13 +184,13 @@ static int Open( vlc_object_t * p_this )
/* TODO: handle interlacing */ /* TODO: handle interlacing */
#define READ_FRAC( key, num, den ) \ #define READ_FRAC( key, num, den ) \
buf = strchr( psz+9, key );\ buf = strstr( psz+9, key );\
if( buf )\ if( buf )\
{\ {\
char *end = strchr( buf, ' ' );\ char *end = strchr( buf+1, ' ' );\
char *sep;\ char *sep;\
if( end ) *end = '\0';\ if( end ) *end = '\0';\
sep = strchr( buf, ':' );\ sep = strchr( buf+1, ':' );\
if( sep )\ if( sep )\
{\ {\
*sep = '\0';\ *sep = '\0';\
...@@ -200,43 +200,47 @@ static int Open( vlc_object_t * p_this ) ...@@ -200,43 +200,47 @@ static int Open( vlc_object_t * p_this )
{\ {\
den = 1;\ den = 1;\
}\ }\
num = atoi( buf+1 );\ num = atoi( buf+2 );\
if( sep ) *sep = ':';\ if( sep ) *sep = ':';\
if( end ) *end = ' ';\ if( end ) *end = ' ';\
} }
READ_FRAC( 'W', i_width, a ) READ_FRAC( " W", i_width, a )
READ_FRAC( 'H', i_height, a ) READ_FRAC( " H", i_height, a )
READ_FRAC( 'F', a, b ) READ_FRAC( " F", a, b )
p_sys->f_fps = (double)a/(double)b; p_sys->f_fps = (double)a/(double)b;
READ_FRAC( 'A', a, b ) READ_FRAC( " A", a, b )
if( b != 0 ) i_aspect = a * VOUT_ASPECT_FACTOR / b; if( b != 0 ) i_aspect = a * VOUT_ASPECT_FACTOR / b;
buf = strchr( psz+9, 'C' ); buf = strstr( psz+9, " C" );
if( buf ) if( buf )
{ {
char *end = strchr( buf, ' ' ); char *end = strchr( buf+1, ' ' );
if( end ) *end = '\0'; if( end ) *end = '\0';
buf++; buf+=2;
if( !strncmp( buf, "C420jpeg", 8 ) ) if( !strncmp( buf, "420jpeg", 7 ) )
{ {
psz_chroma = strdup( "I420" ); psz_chroma = strdup( "I420" );
} }
else if( !strncmp( buf, "C420paldv", 9 ) ) else if( !strncmp( buf, "420paldv", 8 ) )
{ {
psz_chroma = strdup( "I420" ); psz_chroma = strdup( "I420" );
} }
else if( !strncmp( buf, "C420", 4 ) ) else if( !strncmp( buf, "420", 3 ) )
{ {
psz_chroma = strdup( "I420" ); psz_chroma = strdup( "I420" );
} }
else if( !strncmp( buf, "C422", 4 ) ) else if( !strncmp( buf, "422", 3 ) )
{ {
psz_chroma = strdup( "I422" ); psz_chroma = strdup( "I422" );
} }
else if( !strncmp( buf, "C444", 4 ) ) else if( !strncmp( buf, "444", 3 ) )
{ {
psz_chroma = strdup( "I444" ); psz_chroma = strdup( "I444" );
} }
else if( !strncmp( buf, "mono", 3 ) )
{
psz_chroma = strdup( "GREY" );
}
else else
{ {
msg_Warn( p_demux, "Unknown YUV4MPEG2 chroma type \"%s\"", msg_Warn( p_demux, "Unknown YUV4MPEG2 chroma type \"%s\"",
......
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