After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.
This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.
Fixes#2325.