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

demux: fix path extension on non-local inputs (fixes #8115)

parent d9b28c03
...@@ -177,10 +177,9 @@ VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end, i ...@@ -177,10 +177,9 @@ VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end, i
VLC_USED VLC_USED
static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension ) static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
{ {
if( !p_demux->psz_file ) const char *name = (p_demux->psz_file != NULL) ? p_demux->psz_file
return false; : p_demux->psz_location;
const char *psz_ext = strrchr ( name, '.' );
const char *psz_ext = strrchr ( p_demux->psz_file, '.' );
if( !psz_ext || strcasecmp( psz_ext, psz_extension ) ) if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
return false; return false;
return true; return true;
......
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