Don't require a codec for passing the AMF metadata through from the input to the output.

There seems to be some kind of legacy code in the FLV encoder related to some very specific (proprietary?) use of the `onTextData` event, which breaks the `-c:d copy` parameter.

What we want with `-c:d copy` is to be able to propagate the data stream without decoding and re-encoding. As such, we need to allow for `AV_CODEC_ID_NONE`.

We also need to isolate the code specific for when using the `AV_CODEC_ID_TEXT` codec.