title: Error while concatenating audio files with ffmpeg
body: <p>While concatenating audio files with</p>
  <p>ffmpeg -safe 0  -f concat -segment_time_metadata 1 -i {m3u_file_name} -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 {ogg_file_name}</p>
  <p>I get the following output</p>
  <pre><code>ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    libavutil      55. 78.100 / 55. 78.100
    libavcodec     57.107.100 / 57.107.100
    libavformat    57. 83.100 / 57. 83.100
    libavdevice    57. 10.100 / 57. 10.100
    libavfilter     6.107.100 /  6.107.100
    libavresample   3.  7.  0 /  3.  7.  0
    libswscale      4.  8.100 /  4.  8.100
    libswresample   2.  9.100 /  2.  9.100
    libpostproc    54.  7.100 / 54.  7.100
  Input #0, concat, from 'fm3u.m3u':
    Duration: N/A, start: -0.006500, bitrate: N/A
      Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (opus (native) -&gt; vorbis (libvorbis))
  Press [q] to stop, [?] for help
  Output #0, ogg, to 'fout.ogg':
    Metadata:
      encoder         : Lavf57.83.100
      Stream #0:0: Audio: vorbis (libvorbis), 48000 Hz, mono, fltp
      Metadata:
        encoder         : Lavc57.107.100 libvorbis
  [opus @ 0x558b2c245400] Error parsing the packet header.
  Error while decoding stream #0:0: Invalid data found when processing input
  [opus @ 0x558b2c245400] Error parsing the packet header.
  Error while decoding stream #0:0: Invalid data found when processing input
  [opus @ 0x558b2c245400] Error parsing the packet header.
  ...
  ...
  Error while decoding stream #0:0: Invalid data found when processing input
  [opus @ 0x558b2c245400] Error parsing the packet header.
  Error while decoding stream #0:0: Invalid data found when processing input
  size=      47kB time=00:00:10.84 bitrate=  35.2kbits/s speed=4.38x    
  video:0kB audio:42kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 10.251080%
  /fout.ogg
  </code></pre>
  <p>The final audio sounds good.</p>
  <p>ffprobe on the 2 participating files looks like</p>
  <pre><code># ffprobe &lt;FILE&gt;
  
  ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    libavutil      55. 78.100 / 55. 78.100
    libavcodec     57.107.100 / 57.107.100
    libavformat    57. 83.100 / 57. 83.100
    libavdevice    57. 10.100 / 57. 10.100
    libavfilter     6.107.100 /  6.107.100
    libavresample   3.  7.  0 /  3.  7.  0
    libswscale      4.  8.100 /  4.  8.100
    libswresample   2.  9.100 /  2.  9.100
    libpostproc    54.  7.100 / 54.  7.100
  Input #0, ogg, from 'f1.ogg':
    Duration: 00:00:01.08, start: 0.000000, bitrate: 34 kb/s
      Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
  
  # ffprobe &lt;FILE&gt;
  ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    libavutil      55. 78.100 / 55. 78.100
    libavcodec     57.107.100 / 57.107.100
    libavformat    57. 83.100 / 57. 83.100
    libavdevice    57. 10.100 / 57. 10.100
    libavfilter     6.107.100 /  6.107.100
    libavresample   3.  7.  0 /  3.  7.  0
    libswscale      4.  8.100 /  4.  8.100
    libswresample   2.  9.100 /  2.  9.100
    libpostproc    54.  7.100 / 54.  7.100
  Input #0, ogg, from 'f2.ogg':
    Duration: 00:00:05.00, start: 0.000000, bitrate: 6 kb/s
      Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 80 kb/s
      Metadata:
        ENCODER         : Lavc57.107.100 libvorbis
  </code></pre>
  <p>What is the reason of the error?</p>