Skip to content
  • nu774's avatar
    Fix to allow the flac command to parse piped WAV input with · 0da96d3c
    nu774 authored and Erik de Castro Lopo's avatar Erik de Castro Lopo committed
    
    WAVEFORMATEXTENSIBLE format.
    
    MinGW's fseeko() doesn't return error for the attempt to seek on non
    seekable file (same behavior as MSVC).
    The simplest solution would be to change #ifdef _MSC_VER to #ifdef
    _WIN32 here.
    Instead, this patch tests file with fstat(), and use fseeko() only when
    it is a regular file.
    This is confirmed to work properly both on MSVC and MinGW, can seek if
    stdin is a redirected regular file, and doesn't require #ifdef.
    
    Signed-off-by: default avatarErik de Castro Lopo <erikd@mega-nerd.com>
    0da96d3c