generic: minimal libav adjustments

Since libav doesn't implement the avcodec_get_name() util function we
need to implement the AVCodecDescriptor handling in our side.

Libav will also need the AV_OPT_SEARCH_FAKE_OBJ flag to retrieve the
ts_packetsize.