- char psz_path[strlen( psz_dir ) + strlen( psz_name ) + 1];
- struct stat st;
-
- sprintf( psz_path, "%s%s", psz_dir, psz_name );
- msg_Dbg( p_this,
- "autodetected subtitle: %s with priority %d",
- psz_path, i_prio );
-
- if( utf8_stat( psz_path, &st ) && S_ISREG( st.st_mode ) )
- {
- msg_Dbg( p_this,
- "autodetected subtitle: %s with priority %d",
- psz_path, i_prio );
- result[i_sub_count].priority = i_prio;
- result[i_sub_count].psz_fname = strdup( psz_path );
- result[i_sub_count].psz_ext = strdup(tmp_fname_ext);
- i_sub_count++;
- }
- else
- {
- msg_Dbg( p_this, "fopen failed" );
- }