user13823: I've always joined my MOV recordings with
ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/%s'\n" ./*.mov) -c copy o.mov

however, due to a small glitch in one particular file, I get h264_mp4toannexb filter failed to receive output packet. I may discard the part with the glitch, which is around 01m40s into the file. Copying the problematic input file with -c copy works, but using the new output for joining still fails.
Things I tried without success:

-fflags discardcorrupt
-err_detect ignore_err
-ignore_unknown
-copy_unknown
-ss 00:03:00

A Google search for the error above only returns the source code itself for the concat option: ftp://opensource.tambov.ru/ffmpeg/ffmpeg/libavformat/concatdec.c

user13823: One easy workaround I found while writing this question is simply discarding the broken piece of the input file before trying to concatenate the files, in a separate command, since -f concat and -ss 00:03:00 don't work together when "h264_mp4toannexb filter failed to receive output packet" is present.
For example, to discard the first 3 minutes of the file, then concatenate separately:
$ ffmpeg -i broken.mov -c copy -ss 00:03:00 fixed.mov
$ mv broken.mov broken.mov.ignore
$ ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/%s'\n" ./*.mov) -c copy o.mov

I still can't understand why concatenating is the only operation that fails with that error, but the source code linked above might give some hint.

13823: <p>I've always joined my MOV recordings with</p>

<pre><code>ffmpeg -f concat -safe 0 -i &lt;(printf "file '$PWD/%s'\n" ./*.mov) -c copy o.mov
</code></pre>

<p>however, due to a small glitch in one particular file, I get <strong>h264_mp4toannexb filter failed to receive output packet</strong>. I may discard the part with the glitch, which is around 01m40s into the file. Copying the problematic input file with <code>-c copy</code> works, but using the new output for joining still fails.</p>

<p>Things I tried without success:</p>

<ul>
<li><code>-fflags discardcorrupt</code></li>
<li><code>-err_detect ignore_err</code></li>
<li><code>-ignore_unknown</code></li>
<li><code>-copy_unknown</code></li>
<li><code>-ss 00:03:00</code></li>
</ul>

<p>A Google search for the error above only returns the source code itself for the <code>concat</code> option: <a href="ftp://opensource.tambov.ru/ffmpeg/ffmpeg/libavformat/concatdec.c" rel="nofollow noreferrer">ftp://opensource.tambov.ru/ffmpeg/ffmpeg/libavformat/concatdec.c</a></p>
 13823: <p>One easy workaround I found while writing this question is simply discarding the broken piece of the input file before trying to concatenate the files, <strong>in a separate command</strong>, since <code>-f concat</code> and <code>-ss 00:03:00</code> don't work together when <em>"h264_mp4toannexb filter failed to receive output packet"</em> is present.</p>

<p>For example, to discard the first 3 minutes of the file, then concatenate separately:</p>

<pre><code>$ ffmpeg -i broken.mov -c copy -ss 00:03:00 fixed.mov
$ mv broken.mov broken.mov.ignore
$ ffmpeg -f concat -safe 0 -i &lt;(printf "file '$PWD/%s'\n" ./*.mov) -c copy o.mov
</code></pre>

<p>I still can't understand why concatenating is the only operation that fails with that error, but the source code linked above might give some hint.</p>
