Commit 33e3934e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- do not check "always true" case

- fix a small memory leak
parent ba9476d4
......@@ -271,8 +271,6 @@ static int Open( vlc_object_t *p_this )
}
/* fix or warn of incompatible couple */
if( psz_mux && psz_access )
{
if( !strncmp( psz_access, "mmsh", 4 ) &&
strncmp( psz_mux, "asfh", 4 ) )
{
......@@ -281,12 +279,14 @@ static int Open( vlc_object_t *p_this )
msg_Warn( p_stream, "fixing to mmsh/asfh" );
if( p )
{
/* -> a little memleak but ... */
psz_mux = malloc( strlen( "asfh" ) + strlen( p ) + 1);
sprintf( psz_mux, "asfh%s", p );
if( asprintf( &p, "asfh%s", p ) == -1 )
p = NULL;
free( psz_mux );
psz_mux = p;
}
else
{
free( psz_mux );
psz_mux = strdup("asfh");
}
}
......@@ -294,7 +294,7 @@ static int Open( vlc_object_t *p_this )
!strncmp( psz_access, "udp", 3 ) ) &&
strncmp( psz_mux, "ts", 2 ) )
{
msg_Err( p_stream, "for now udp and rtp are only valid with TS" );
msg_Err( p_stream, "UDP and RTP are only valid with TS" );
}
else if( strncmp( psz_access, "file", 4 ) &&
( !strncmp( psz_mux, "mov", 3 ) ||
......@@ -302,7 +302,6 @@ static int Open( vlc_object_t *p_this )
{
msg_Err( p_stream, "mov and mp4 work only with file output" );
}
}
msg_Dbg( p_this, "using `%s/%s://%s'", psz_access, psz_mux, psz_url );
......
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